Home

Awesome

CUID: Collision-resistant ids optimized for horizontal scaling and performance.

Build Status License: MIT

Implementation of https://github.com/ericelliott/cuid in Racket/Scheme.

A cuid is a portable and sequentially-ordered unique identifier designed for horizontal scalability and speed -- this version is ported from the reference implementation in Javascript.

Example

> (cuid)
"c0JU1BP7VK0000JENK2MF8ZMHN"
> (slug)
"LH0001EK8R"

Broken down

** c - 0JU1BP7VK - 0000 - JENK - 2MF8ZMHN **

The groups, in order, are:

Short URLs

Need a smaller ID? slug is for you. With 10 characters, slug is a great solution for short urls. They're good for things like URL slug disambiguation (i.e., example.com/some-post-title-<slug>) but absolutely not recommended for database unique IDs. Stick to the full cuid for database keys.

License

MIT License © 2019 Theo Despoudis