This package is V implementation of NanoID
Generated from Go Nanoid
Safe. It uses cryptographically strong random generator.
Compact. It uses more symbols than UUID (A-Za-z0-9_-
)
and has the same number of unique options in just 22 symbols instead of 36.
Fast. Nanoid is as fast as UUID but can be used in URLs.
Via vpm
$ v install invipal.nanoid
Generate ID
id := nanoid.new() or { 'error' }
Generate ID with a custom alphabet and length
id := nanoid.generate('erzurum', 25) or { 'error' }
I would welcome your contribution! If you find any improvement or issue you want to fix, feel free to send a pull request, I like pull requests that include test cases for fix/enhancement.
The MIT License (MIT). Please see License File for more information.