UNPKG

idgenie

Version:

A magical and flexible ID generator with support for unique IDs, date/time, prefixes, suffixes, and more.

30 lines 912 B
/** * Options for generating unique IDs with idgenie. */ export interface GenerateUniqueIdOptions { length?: number; randomLength?: boolean; prefix?: string; suffix?: string; includeDate?: boolean; includeTime?: boolean; dateLocale?: string; timeLocale?: string; dateFormatOptions?: Intl.DateTimeFormatOptions; timeFormatOptions?: Intl.DateTimeFormatOptions; alphabet?: string; casing?: "lower" | "upper" | "mixed"; separator?: string; secure?: boolean; mode?: "random" | "uuid"; counter?: boolean; timestamp?: boolean; } /** * Generates a flexible unique ID based on options. * @param options - Configuration options for ID generation. * @returns A generated unique string ID. * @throws {TypeError} If length is invalid. */ export declare function uniqueId(options?: GenerateUniqueIdOptions): string; //# sourceMappingURL=index.d.ts.map