UNPKG

hd-utils

Version:

A handy utils for modern JS developers

9 lines (8 loc) 265 B
/** * @description will generate a random integer * @param rightBound @default 1000_000_000 * @example generateRandomInt() // 831723204 */ export default function generateRandomInt(rightBound = 1000000000) { return Math.floor(Math.random() * rightBound); }