next-random
Create random number.
installation
npm install -S @jswork/next-random
usage
import '@jswork/next-random';
// case1: get random
nx.random(1,100); // 1 ~ 99
// case2: get a random list
nx.random(1,100, 20);
/*
[
31, 33, 57, 42, 53, 34, 2,
17, 63, 46, 96, 81, 68, 5,
89, 73, 94, 58, 65, 41
]
*/
license
Code released under the MIT license.