uid
# uid - UUID v4/v7 and ULID generation.
Load with: use uid
Quick example
use uid
result = uidhe("value")
prn(result)
Functions
UUID v4 (random)
uidv4()
Performs the operation.
UUID v7 (timestamp + random) - sortable
uidv7()
Performs the operation.
ULID (timestamp + random) - sortable, base32
ulid()
Performs the operation.
Convert 16 bytes to UUID string
uidhe(b)
Performs the operation. Takes b.
Parse UUID string to bytes
uidpa(s)
Parses. Takes s.
uidun(h)
Performs the operation. Takes h.
ULID encoding (base32 crockford)
ulide(ts, rnd)
Decodes. Takes ts, rnd.
Validate UUID format
uidok(s)
Performs the operation. Takes s.
hexok(h)
Performs the operation. Takes h.
NIL UUID
uidni()
Performs the operation.
Compare UUIDs (for sorting v7/ULID)
uidcm(a, b)
Performs the operation. Takes a, b.
Notes
- Unique ID generation - UUID v4, nanoid, ULID.