All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.cjs.random.js Maven / Gradle / Ivy

The newest version!
// Return a random integer between `min` and `max` (inclusive).
function random(min, max) {
  if (max == null) {
    max = min;
    min = 0;
  }
  return min + Math.floor(Math.random() * (max - min + 1));
}

module.exports = random;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy