UNPKG

fast-key-generator

Version:
19 lines (15 loc) 429 B
/** * @format */ type TransformFunction = (key: string) => string; type ValidateFunction = (key: string) => boolean; interface Options { size?: number; prefix?: string; chartype?: "alpha" | "alphanum" | "numeric" | "symbols"; charset?: string; transform?: "none" | "lower" | "upper" | TransformFunction; validate?: ValidateFunction; exclude?: string[]; } export function generateKey(options: Options): string;