01AN4Z07BY 79KA1307SR9X4MV3
|----------| |----------------|
Timestamp Entropy
10 chars 16 chars
48bits 80bits
base32 base32
Generate ULID
- Is compatible with UUID/GUID's
- 1.21e+24 unique ULIDs per millisecond (1,208,925,819,614,629,174,706,176 to be exact)
- Lexicographically sortable
- Canonically encoded as a 26 character string, as opposed to the 36 character UUID
- Uses Crockford's base32 for better efficiency and readability (5 bits per character)
- Case insensitive
- No special characters (URL safe)
Add .npmrc file in your repository
@stephen-shopopop:registry=https://npm.pkg.github.com
npm install @stephen-shopopop/[email protected]
import { ulid } from "@stephen-shopopop/ulid"
ulid() // 01FW7DJFPDVRRTZZ2UDEE5GW2T
import { monotonic } from "@stephen-shopopop/ulid"
const ulid = monotonic()
ulid() // 01FWXNVK9DWNT24RR10X35F3KZ
ulid(1646295334605) // 01FWXNVK9D0WNT24RR10X35F3M
ulid(1646295334605) // 01FWXNVK9D0WNT24RR10X35F3N
- npm run build - Build library.
- npm run start - start project
- npm run test - Run test with jest.
- npm run lint - Lint your code.
- npm run lint:fix - Lint & fix your code.
- npm run typecheck - Run typescript check.
- npm run doc - Generate html doc.
- npm run release - Release library
- npm run fix - Fix library
A modern cli tool that keeps your deps fresh
npx taze