array-pick-random
v0.0.1
Published
Pick a number of unique items from a given array (without using array.sort)
Downloads
2
Maintainers
Readme
Array Pick Random
Pick a number of unique items from a given array (without using array.sort)
Installation
npm install --save array-pick-random
Usage
array_pick_random( array: any[], itemsCount: number ): any[];
Usage example
import array_pick_random from 'array-pick-random';
console.log(
array_pick_random([ 1,2,3,4,5,6,7,8,9 ], 3),
// Returns [ 6, 1, 4 ]
);