2.0.0 • Published 10 years ago
randray v2.0.0
randray
Get a random item from an array
Note: randray is only supported on iojs and node v4+. To use with an older
version of node, please use randray@1.
Install
$ npm install --save randrayAPI
var randray = require('randray')
// not an array will throw
randray(true)
// empty array will return null
randray([])
// => null
randray([1, 2, 3, 4])
// => 2Test
$ npm testCoverage
$ npm test -- --covAuthor
Evan Lucas
License
MIT (See LICENSE for more info)