time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

_arrayShuffle.js (365B)


      1 var copyArray = require('./_copyArray'),
      2     shuffleSelf = require('./_shuffleSelf');
      3 
      4 /**
      5  * A specialized version of `_.shuffle` for arrays.
      6  *
      7  * @private
      8  * @param {Array} array The array to shuffle.
      9  * @returns {Array} Returns the new shuffled array.
     10  */
     11 function arrayShuffle(array) {
     12   return shuffleSelf(copyArray(array));
     13 }
     14 
     15 module.exports = arrayShuffle;