Skip to main content

IDUtils

Module Overview

Keywork includes utilities for generating IDs.

ULIDs

ULIDs are provided via ULIDX

import { ulid } from 'keywork/ids'

const id = ulid()

Snowflake IDs

Keywork's SnowflakeID is a basic implementation of Twitter's original Snowflake ID system.

import { SnowflakeID } from 'keywork/ids'

const id = new SnowflakeID()

Usage

import * as IDUtils from 'keywork/ids'

IDs Classes