get-random
v1.0.0
Published
Returns a random integer between min and max
Downloads
3
Maintainers
Readme
get-random
Returns a random integer between min and max (INCLUDING)
Install
$ npm install --save get-random
Example
var getRandom = require('get-random');
console.log(getRandom(5, 100));
//=> 34
console.log(getRandom(10));
//=> 4
require('get-random')(min, max)
Arguments:
min
: The minimum number to startmax
: The max limit to end- When there is only one argument the random number will be generated form 0 to max
Returns: Returns a random integer between min and max (INCLUDING)
License
© 2016 vikram. MIT License