blob: 023077ac4e825cdbdaff6893ef3caff9a474f600 [file] [log] [blame]
Leo Repp58b9f112021-11-22 11:57:47 +01001var shuffleSelf = require('./_shuffleSelf'),
2 values = require('./values');
3
4/**
5 * The base implementation of `_.shuffle`.
6 *
7 * @private
8 * @param {Array|Object} collection The collection to shuffle.
9 * @returns {Array} Returns the new shuffled array.
10 */
11function baseShuffle(collection) {
12 return shuffleSelf(values(collection));
13}
14
15module.exports = baseShuffle;