UNPKG

@mhysko/s-uuid

Version:

Translate standard UUID to Base68 format and back

17 lines (16 loc) 476 B
import { v4 } from 'uuid'; declare class Suuid { #private; readonly uuidFn: typeof v4; readonly encoding: string; get length(): number; constructor(uuidFn?: typeof v4); generate(): string; translate(id: string): string; fromUuid(id: string): string; toUuid(id: string): string; validate(id: string, strict?: boolean): boolean; isUuid(id: string): boolean; isSuuid(id: string, strict?: boolean): boolean; } export default Suuid;