UNPKG

@thi.ng/ksuid

Version:

Configurable K-sortable unique IDs, ULIDs, binary & base-N encoded, 32/48/64bit time resolutions

4 lines (3 loc) 151 B
import { defKSUID32 } from "./ksuid32.js"; const bytes = parseInt(process.argv[3] || "16"); process.stdout.write(defKSUID32({ bytes }).next() + "\n");