A simple library to generate binary UUIDv7s and ULIDs.
const { ULID, UUIDv7, ULIDMonotonicFactory } = require('@control/uulid');
const ulid = new ULID();
const ulid_human = ulid.toString();
const ulid_bytes = ulid.bytes;
const other_ulid_bytes = ULID.generate();
const uuidv7 = new UUIDv7();
const uuidv7_bytes = uuidv7.bytes;
const other_uuidv7_bytes = UUIDv7.generate();
Fully compliant with specs:
- UUID v7: https://www.rfc-editor.org/rfc/rfc9562.html#name-uuid-version-7
- ULID: https://github.com/ulid/spec
- Implement in Rust with JS bindings for performance
- Unroll quintets manually to prevent byte loops