@control/uulid
v0.0.1
Published
<h1 align="center">UUIDv7 & ulid</h1>
Downloads
2
Readme
A simple library to generate binary UUIDv7s and ULIDs.
Usage
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();
Spec
Fully compliant with specs:
- UUID v7: https://www.rfc-editor.org/rfc/rfc9562.html#name-uuid-version-7
- ULID: https://github.com/ulid/spec
Next steps
- Implement in Rust with JS bindings for performance
- Unroll quintets manually to prevent byte loops