1.0.1 • Published 6 years ago

random-n v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Build Status Coverage

random-n

šŸš€ The blazing fast module to get a random collection of n different items from an array.

Install

$ npm i random-n

Usage

import random from 'random-n'

random([1, 2, 3, 4, 5], 3)

// [3, 2, 5]

random(array, size?)

  • array Array
  • size ?int=array.length The n-size of the collection. If not specified, the length of the array will be used.

Returns Array

License

MIT