Cuid
Collision-resistant ids.
Usage:
# Start the generator
{:ok, generator} = Cuid.start_link
# Generate a new CUID
Cuid.generate(generator)
Summary↑
generate(generator) | Generates and returns a new CUID |
start_link(process_opts \\ []) | Starts a new generator |
Functions
Specs:
- generate(generator :: pid) :: String.t
Generates and returns a new CUID.
Specs:
- start_link(process_opts :: list | nil) :: {:ok, pid} | {:error, term}
Starts a new generator.
Returns either {:ok, pid}
or {:error, reason}