Sébastien Rigaux

JavaScript ULIDs for sortable, monotonic identifiers

RepositoryJavaScript
View resource

github.com

This JavaScript repository generates ULIDs: 26-character identifiers compatible with 128 bits and sortable lexicographically. Their time component helps order identifiers, while the monotonic generator preserves strict ordering when multiple values are created within the same millisecond.

The library detects a cryptographically secure pseudorandom number generator (crypto.getRandomValues in browsers, crypto.randomBytes in Node.js). It also provides timestamp validation, encoding and decoding, along with ESM and CommonJS entry points.

GitHub banner for the ulid/javascript repository, showing its name, the phrase “Universally Unique Lexicographically Sortable Identifier,” and contributor, issue, discussion, star, and fork counts.