UNPKG

sectom

Version:

Sectom is a useful npm package that has multiple easy to use functions.

14 lines (12 loc) 355 B
/** * Returns a random number between min (inclusive) and max (exclusive) * @param {number} min * @param {number} max */ function randomNumber(min, max) { const sum = Math.random() * (max - min) + min; let result = parseInt(sum.toString().split(".")); if (result == 0) result = 1; return result; } module.exports = randomNumber;