Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CUID generator for OCaml. 🆔 🐫 🔢 ⚙️

License

schutm/ocaml-cuid

 
 

Repository files navigation

cuid

CUID generator for OCaml.

Ubuntu Workflow Status Windows Workflow Status MacOS Workflow Status Project License

For further information, please refer to http://usecuid.org

Installation

If available on OPAM, it's easily installed with:

$ opam install cuid

Otherwise, this library is also installable using Dune within this root directory:

$ dune install

Usage

As library:

let cuid = Cuid.generate ( )
(* cuid is "c00p6veue0000072slgr067a3", for example *)

There's also an implementation of CUID slugs. They fit in cases where collision resistance is not important and when they are not generated too frequently. For instance, we can use them as URL suffixes for blog posts. To generate a CUID slug, just use:

let slug = Cuid.slug ( )
(* slug is "u90m0y0m", for example *)

Conclusion

PRs & issues are welcome. Have fun and imagine Sisyphus happy.

About

CUID generator for OCaml. 🆔 🐫 🔢 ⚙️

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • OCaml 87.8%
  • Makefile 12.2%