Files
lodash/.internal/baseSample.js
John-David Dalton 6cb3460fce Remove semicolons.
2017-02-05 22:22:04 -08:00

16 lines
351 B
JavaScript

import arraySample from './arraySample.js'
import values from '../values.js'
/**
* 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))
}
export default baseSample