Description
Generates an array of unique random integers using a Mersenne-twister algorithm.
Install
npm install random-array-generator
Usage
Add the following line of code to your project:
var generator = require;
To generate an array of random numbers, pass an object into the "randomArray()" function, which will then return an array containing the generated numbers. The object must be in the form:
generator.randomArray;
Where x and y represents the range (inclusive) of the random numbers to be generated and z is the number of random integers to be generated.
Example:
// import package into your projectvar generator = require; // Generate 6 random numbers between 1 and 49 and log to the console.console.log; // Result: [2, 34, 17, 11, 47, 25]