UNPKG

@svara/npmsemver

Version:

Experimental package to test release automation

31 lines (30 loc) 870 B
/** * Generate an integer bound random number [min, max) */ export declare function intRandom(max: number, min?: number): number; /** * Pick a random element from an array like object (array or string) * WARNING: It is not cryptographically secure */ export declare function pick<T>(data: ArrayLike<T>): T; /** * Pick many random elements from an array * WARNING: It is not cryptographically secure */ export declare function pickMany<T>(data: ArrayLike<T>, length: number): T[]; /** * Provide a random fruit emoji */ export declare function fruit(): string; /** * Provide a random string of fruit emojis */ export declare function fruitSalad(length?: number): string; /** * Provide a random animal emoji */ export declare function animal(): string; /** * Provide a random string of animal emojis */ export declare function zoo(length?: number): string;