deconstruct()
function src/snowflake.ts:146function deconstruct(id: string, options?: SnowflakeDeconstructOptions): SnowflakeGenerate and take apart Discord-style snowflake ids.
import { Snowflake } from 'detritus-utils';Object shapes for options, payloads and events.
Standalone helpers.
function deconstruct(id: string, options?: SnowflakeDeconstructOptions): Snowflakefunction generate(options?: SnowflakeGenerateOptions): SnowflakeIds made without timestamp and sequence are unique within this process (for the same workerId and processId), whatever other calls passed An explicit timestamp before the clock's last used millisecond (or past the real clock) can collide with ids made in it Out of range workerIds and processIds are masked to 5 bits
function timestamp(id: string, options?: SnowflakeDeconstructOptions): number