MCPcopy Index your code
hub / github.com/deployd/deployd / baseSampleSize

Function baseSampleSize

test-app/public/sinon.js:14581–14584  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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`.

Callers

nothing calls this directly

Calls 3

valuesFunction · 0.85
shuffleSelfFunction · 0.85
baseClampFunction · 0.85

Tested by

no test coverage detected