UNPKG

zexson_toolkit

Version:

Zexson Toolkit is a powerful encryption and tokenization library developed by Zexson Team. It offers proprietary encryption algorithms, high-security random token generation, and advanced object comparison features. It includes many advanced security func

19 lines (18 loc) 705 B
import type { CharacterSetType } from './types'; export declare const characterSets: Record<CharacterSetType, string>; /** * Generates a random token string of specified length using the given character set * * @param {number} length - The desired length of the generated token * @param {CharacterSetType} charSet - The character set to use for generation * @returns {string} A random token string * @throws {Error} If token generation fails * * @example * tokenGenerator(8, 'defaultSet') // Returns something like "Kj9mP2nX" * * @since 1.0.0 * @category Generator * @public */ export declare const tokenGenerator: (length: number, charSet?: string | undefined) => string;