This is a ULID implementation in pure Janet. ulid.lua was used as a reference. It uses os/cryptorand as a source of randomness.
This library can be installed with:
jpm install https://github.com/rokf/janet-ulid
Alternatively you can put this into your project's dependency tuple:
{:url "https://github.com/rokf/janet-ulid.git" :tag "main"}
The ulid
module that is part of this library exposes a single function, called make
. It returns a ULID in string
form.
(import ulid)
(def my-new-id (ulid/make))
MIT - see the LICENSE
file for details.