blob: 46313a39b7e79685decfc2045687bc6ba9b124a2 [file] [log] [blame]
Leo Repp58b9f112021-11-22 11:57:47 +01001var 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 */
11function arrayShuffle(array) {
12 return shuffleSelf(copyArray(array));
13}
14
15module.exports = arrayShuffle;