Skip to content

newId

function newId(prefix, now?): string;

Defined in: src/id.ts:21

A new id: prefix + _ + 22 lowercase base32 chars (sorts by creation time). now (unix ms) defaults to Date.now(); ids minted in the same millisecond (or under a clock that went backwards) still sort in creation order.

Parameter Type
prefix string
now? number

string