$ npm install random-int
Generate a random integer
$ npm install random-int
import randomInteger from 'random-int';
randomInteger(5);
//=> 3
randomInteger(10, 100);
//=> 54
Returns an integer from 0
to maximum
.
Returns an integer from minimum
to maximum
.
Type: number
Default: 0
Minimum integer to return.
Type: number
Default: 1
Maximum integer to return.
© 2010 - cnpmjs.org x YWFE | Home | YWFE