* The base implementation of `_.sampleSize` without param guards. * * @private * @param {Array|Object} collection The collection to sample. * @param {number} n The number of elements to sample. * @returns {Array} Returns the random elements.
(collection, n)
| 14579 | * @returns {Array} Returns the random elements. |
| 14580 | */ |
| 14581 | function baseSampleSize(collection, n) { |
| 14582 | var array = values(collection); |
| 14583 | return shuffleSelf(array, baseClamp(n, 0, array.length)); |
| 14584 | } |
| 14585 | |
| 14586 | /** |
| 14587 | * The base implementation of `_.set`. |
nothing calls this directly
no test coverage detected