SnowflakeID
Overview
Usage
- Node
- Deno
- Browser/ESM
import { SnowflakeID } from 'keywork/ids'
import { SnowflakeID } from 'https://deno.land/x/keywork/ids'
let { SnowflakeID } = await import('https://esm.sh/keywork/ids')
Constructors
constructor
new SnowflakeID
(options?)
Parameters
Name | Type |
---|---|
options | Object |
options.mid? | number |
options.offset? | number |
Defined in
ids/SnowflakeID.ts:28
Methods
generate
generate
(): `string`
Returns
string
Defined in
ids/SnowflakeID.ts:35
A basic implementation of Twitter's original Snowflake ID system.