UNPKG

@nats-io/nuid

Version:

NUID - A highly performant unique identifier generator.

15 lines (14 loc) 476 B
/** * Public Nuid interface — generates 22-char base62 unique identifiers. * Output format matches Go `nats-io/nuid`. */ export type Nuid = { /** Returns the next 22-char base62 nuid. */ next(): string; /** Re-randomizes prefix and sequence counter. */ reset(): void; }; /** Constructor for an isolated `Nuid` instance. */ export declare const Nuid: new () => Nuid; /** Shared global `Nuid` — call `next()` directly. */ export declare const nuid: Nuid;