Skip to content

v2.0.0

Compare
Choose a tag to compare
@alizain alizain released this 25 Oct 21:54
· 41 commits to master since this release

Breaking changes to API with new module format

We're modernizing the library, with proper ES6 exporting, 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>