Giter VIP home page Giter VIP logo

ocaml-cuid's Introduction

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 cuid

This cuid package is just an alias/wrapper around the cuid-unix package, there is a JavaScript-target package called cuid-jv as well.

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 *)

For the cuid-unix internal package, the main module is called Cuid_unix, while the cuid-jv exposes the main module Cuid_jv.

Conclusion

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.