UNPKG

super-utils-plus

Version:

A superior alternative to Lodash with improved performance, TypeScript support, and developer experience

58 lines (57 loc) 1.32 kB
/** * Generates a random number between min and max (inclusive). * * @param min - The minimum value * @param max - The maximum value * @returns A random number between min and max * * @example * ```ts * random(1, 10); * // => a number between 1 and 10 * ``` */ export declare function random(min?: number, max?: number): number; /** * Generates a random integer between min and max (inclusive). * * @param min - The minimum value * @param max - The maximum value * @returns A random integer between min and max * * @example * ```ts * randomInt(1, 10); * // => an integer between 1 and 10 * ``` */ export declare function randomInt(min: number, max: number): number; /** * Generates a random string of the specified length. * * @param length - The length of the string * @param charset - The characters to use (defaults to alphanumeric) * @returns A random string * * @example * ```ts * randomString(10); * // => "a1b2c3d4e5" * * randomString(5, 'ABC'); * // => "BACAB" * ``` */ export declare function randomString(length: number, charset?: string): string; /** * Generates a random UUID v4. * * @returns A random UUID v4 string * * @example * ```ts * randomUUID(); * // => "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed" * ``` */ export declare function randomUUID(): string;