You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yanzong_qianduan/node_modules/lodash/_baseSample.js

16 lines
359 B

7 months ago
var arraySample = require('./_arraySample'),
values = require('./values');
/**
* The base implementation of `_.sample`.
*
* @private
* @param {Array|Object} collection The collection to sample.
* @returns {*} Returns the random element.
*/
function baseSample(collection) {
return arraySample(values(collection));
}
module.exports = baseSample;