Package Exports
- random-array-index
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (random-array-index) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
random-array-index
npm i --save random-array-index
usage
var randomArrayIndex = require('random-array-index')
var things = ['cat', 'dog', 'cactus', 'dinosaur', 'sloth', 'water bottle']
var idx = randomArrayIndex(things)
console.log(idx, things[idx])
api
randomArrayIndex(array)
Returns an integer from 0
to array.length - 1
license
MIT