mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
16 lines
376 B
JavaScript
16 lines
376 B
JavaScript
import shuffleSelf from './.internal/shuffleSelf.js';
|
|
import values from './values.js';
|
|
|
|
/**
|
|
* The base implementation of `shuffle`.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to shuffle.
|
|
* @returns {Array} Returns the new shuffled array.
|
|
*/
|
|
function baseShuffle(collection) {
|
|
return shuffleSelf(values(collection));
|
|
}
|
|
|
|
export default baseShuffle;
|