Skip to content

titouancreach/typeid-ocaml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OCaml TypeId

An OCaml, following the specs, implementation of TypeId. Also provide a implementation of UUIDv7

Usage:

let () =
  Random.self_init ();
  let id = Typeid.make "myprefix" in
  let id_str = Typeid.to_string id in
  Printf.printf "%s" id_str;
  match Typeid.from_string_option id_str with
    | Some x -> (* my typeid *)
    | None -> failWith "Can't parse typeid"

Note

UuidV7 uses random bits so, you need to initialize the random pseudo generator yourself.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages