Function for get randomly items for a iterator.
Via npm: npm i get-randomly
.
Simple example:
const getRandomly = require('get-randomly')
const arr = [true, 'foo', function(){}]
const randomItem = getRandomly(arr)
For test this package execute: npm run test
.