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