UNPKG

cosa-nostra-backstabbers

Version:
11 lines (6 loc) 217 B
var cryptoRandom = require("./cryptoRandom.js"); module.exports = function (array) { var indices = array.length; var index = Math.floor(cryptoRandom(indices*3, indices*1) * indices); return array[index]; };