Skip to content

squidink7/nanoid

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

V NanoID

Test Status Lint Status GitHub issues License Twitter Follow Twitter Follow

This package is V implementation of NanoID

It was forked from invipal's implemenation, which itself was 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.

Install

Via vpm

$ v install squidink7.nanoid

Usage

Generate ID

id := nanoid.new()

Generate ID with a custom alphabet and length

id := nanoid.generate('erzurum', 25)

Contribution

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.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

V implementation of NanoID

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • V 96.0%
  • AMPL 4.0%