Pick random items from a list
Useful for making decisions, picking a winner, or anything else randomness can help you with.
$ npm install pick-random
import pickRandom from 'pick-random';
pickRandom(['Sindre', 'Stephen', 'Unicorn', 'Pascal', 'Addy', 'Pony'], {count: 2});
//=> ['Unicorn', 'Pony']
Returns an Array.
Type: Array
The list to pick from.
Type: object
Type: number
Default: 1
The number of picks.
Must be smaller or the same length as input.