Skip to content

rokf/janet-ulid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

janet-ulid

This is a ULID implementation in pure Janet. ulid.lua was used as a reference. It uses os/cryptorand as a source of randomness.

Installation

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"}

API

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))

License

MIT - see the LICENSE file for details.