mirror of
https://github.com/Yu-Vitaqua-fer-Chronos/NULID.git
synced 2024-11-21 05:53:14 +00:00
8c3165a000
Add std/json support |
||
---|---|---|
.github/workflows | ||
src | ||
tests | ||
.gitignore | ||
nulid.nimble | ||
README.md |
NULID
This is an implementation of the ULID spec in Nim! This also supports the JS backend for ULID generation!
This supports jsony
and
debby
out of the box too!
Random fun fact: I coded the initial code for ULID generation on my phone via Termux!
Compile Flags
-d:nulidInsecureRandom
: Uses std/random
instead of std/sysrand
.
-d:nulidNoLocks
: Disables any usage of locks within the program.
The JS backend automatically defines -d:nulidNoLocks
.
Usage
let gen = initUlidGenerator()
let ulid = gen.ulid()
echo ulid