View Source HumbleUlid (humble_ulid v0.1.0)

Universally Unique Lexicographically Sortable Identifier.

  • Binary compatible with 128 bit UUIDs
  • 1.21e+24 unique ULIDs per millisecond
  • Lexicographically sortable!
  • Uses Crockford's base32 for better efficiency and readability (5 bits per character)
  • Case insensitive

How to use

alias HumbleUlid, as: ULID

ULID.generate()
ULID.generate_binary()

Summary

Functions

Generates a new Crockford base32 encoded ULID based on the provided timestamp or the current System Time.

Generates a new ULID in binary form based on the provided timestamp or the current System Time.

Functions

Link to this function

decode(ulid, to \\ :binary)

View Source
Link to this function

generate(timestamp \\ System.system_time(:millisecond))

View Source

Generates a new Crockford base32 encoded ULID based on the provided timestamp or the current System Time.

Link to this function

generate_binary(timestamp \\ System.system_time(:millisecond))

View Source

Generates a new ULID in binary form based on the provided timestamp or the current System Time.