import { Snowflake } from "https://deno.land/x/snowflakes@1.0.0/Snowflake.ts";
Generates a snowflake given an epoch and optionally a timestamp
Examples
Example 1
Example 1
const epoch = new Date('2000-01-01T00:00:00.000Z');
const snowflake = new Snowflake(epoch).generate();
Parameters
optional
unnamed 0: SnowflakeGenerateOptions = [UNSUPPORTED]options to pass into the generator, see SnowflakeGenerateOptions
note when increment
is not provided it defaults to the private increment
of the instance