Skip to content

Documentation / @andrew_l/snowflake / SnowflakeOptions

Interface: SnowflakeOptions

Options for Snowflake

Properties

epoch

epoch: number | bigint | Date

Timestamp or date of the snowflake to generate


increment?

optional increment: number | bigint

The increment to use

Default

ts
0

Remark

keep in mind that this number is auto-incremented between generate calls


processId?

optional processId: number | bigint

The process ID to use, will be truncated to 5 bits (0-31)

Default

ts
1

workerId?

optional workerId: number | bigint

The worker ID to use, will be truncated to 5 bits (0-31)

Default

ts
0