Universally Unique Lexicographically Sortable Identifier
Math.random
We're modernizing the library, with proper ES6 export
ing, and CommonJS support with rollup
. As a result, the API will change.
For TypeScript and ES6 consumers
import { ulid, factory, monotonicFactory } from 'ulid'
ulid()
For CommonJS consumers Sorry guys, if you can tell me a better way, I'd be happy to implement it!
const ULID = require('ulid')
ULID.ulid()
For browser usage
<script src="/path/to/ulid.js"></script>
<script>
ULID.ulid()
</script>
Spec'ed out and implemented! See the readme for more information