Get random, unique values from an object
Install
$ npm install --save object-random
Usage
var objectRandom = ;var obj = a: 0 b: 1 c: 2 d: 3 e: 4; ;//=> [4] ;//=> [0, 3, 2]
objectRandom(object, options)
Returns an array
.
object
Required
Type: object
Object to pick from.
options
Type: object
Options to pass.
count
Type: number
Default: 1
Number of returned values.
License
MIT © Andreas Gillström