random-uniq-array
v1.0.1
Published
Select a unique element from an array successively
Downloads
3
Maintainers
Readme
random-uniq-array
Get a unique element from an array successively
Install
$ npm install --save random-uniq-array
Usage
const randomUniqArray = require('random-uniq-array')
const arr = ['earth', 'mars', 'jupiter', 'saturn']
const random = randomUniqArray(arr)
console.log(random(), random(), random())
// prints mars, earth, saturn