UNPKG

diginext-utils

Version:
17 lines 499 B
/** * Generates a random integer between min and max (inclusive). * * @param min - The minimum value (inclusive) * @param max - The maximum value (inclusive) * @returns A random integer between min and max * * @example * ```ts * randomInt(1, 10); // Random integer between 1 and 10 * randomInt(0, 100); // Random integer between 0 and 100 * ``` */ export function randomInt(min, max) { return min + Math.floor(Math.random() * (max - min + 1)); } //# sourceMappingURL=randomInt.js.map