A ULID implementation in Nim!
Go to file
Yu Vitaqua fer Chronos 8c3165a000
Merge pull request #2 from Yu-Vitaqua-fer-Chronos/devel
Add std/json support
2024-01-25 21:53:24 +00:00
.github/workflows Fix action 2024-01-25 21:49:52 +00:00
src Add std/json support, remove redundant test on tag 2024-01-25 21:44:41 +00:00
tests Add std/json support, remove redundant test on tag 2024-01-25 21:44:41 +00:00
.gitignore Fix tests for JavaScript, raise errors and defects that inherit from one type 2023-11-01 21:43:23 +00:00
nulid.nimble Add std/json support, remove redundant test on tag 2024-01-25 21:44:41 +00:00
README.md Fix tests for JavaScript, raise errors and defects that inherit from one type 2023-11-01 21:43:23 +00:00

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