Project

cuid2

0.0
The project is in a healthy, maintained state
Secure, collision-resistant ids optimized for horizontal scaling and performance.Next generation UUIDs. Need unique ids in your app? Forget UUIDs which often collide in large apps.Use Cuid2, instead.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Cuid2

Ruby implementation of Cuid2.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

Installation

Install the gem and add to the application's Gemfile by executing:

$ bundle add cuid2

If bundler is not being used to manage dependencies, install the gem by executing:

$ gem install cuid2

Usage

First require it.

require 'cuid2'

Generate a Cuid2 with call.

Cuid2.generate
=> "zw881lkfxx644yknviucss31"
Cuid2.call
=> "yra4dr2qteivp6kkur89gd11"
Cuid2.()
=> "cr6x94qpqagcgbay780xifun"

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/stulzer/cuid2. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

Code of Conduct

Everyone interacting in the Cuid2 project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.