Skip to main content
The Deno 2 Release Candidate is here
Learn more
Latest
method Snowflake.prototype.deconstruct
import { Snowflake } from "https://deno.land/x/snowflakes@1.0.0/Snowflake.ts";

Deconstructs a snowflake given a snowflake ID

Examples

Example 1

const epoch = new Date('2000-01-01T00:00:00.000Z');
const snowflake = new Snowflake(epoch).deconstruct('3971046231244935168');

Parameters

id: string | bigint

the snowflake to deconstruct

Returns

a deconstructed snowflake