random-n
🚀 The blazing fast module to get a random collection of n different items from an array.
Install
$ npm i random-n
Usage
// [3, 2, 5]
random(array, size?)
- array
Array
- size
?int=array.length
The n-size of the collection. If not specified, the length of thearray
will be used.
Returns Array
License
MIT