lib/utils.js
function random(min, max) {
  var randomNumber = Math.random() * (max - min + 1) + min;

  if (!Number.isInteger(min) || !Number.isInteger(max)) {
    return randomNumber;
  } else {
    return Math.floor(randomNumber);
  }
}
function random(min, max) {
  var randomNumber = Math.random() * (max - min + 1) + min;

  if (!Number.isInteger(min) || !Number.isInteger(max)) {
    return randomNumber;
  } else {
    return Math.floor(randomNumber);
  }
}
function random ( min , max ) { var randomNumber = Math . random ( ) * ( max - min + 1 ) + min ; if ( ! Number . isInteger ( min ) || ! Number . isInteger ( max ) ) { return randomNumber ; } else { return Math . floor ( randomNumber ) ; } }
Enhanced random function, selects a random value between a minimum and maximum. If the values provided are both
integers then the number returned will be an integer, otherwise the return number will be a decimal.
@param min The minimum value
@param max The maximum value
Enhanced random function selects a random value between a minimum and maximum . If the values provided are both integers then the number returned will be an integer otherwise the return number will be a decimal .