nanoid.cr
Crystal implementation of original NanoID https://github.com/ai/nanoid
Installation
Add this to your application's shard.yml
:
dependencies:
nanoid:
github: mamantoha/nanoid.cr
Usage
require "nanoid"
Nanoid.generate
# => 3gFI8yZxcfXsXGhB0036l
Nanoid.generate(size: 8, alphabet: "1234567890abcdef")
# => 86984b57
Development
Clone this repository and install dependencies:
shards install
Run tests:
crystal spec
Contributing
- Fork it ( https://github.com/mamantoha/nanoid.cr/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- mamantoha Anton Maminov - creator, maintainer
License
Copyright: 2018 Anton Maminov ([email protected])
This library is distributed under the MIT license. Please see the LICENSE file.