mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Remove references to _.
This commit is contained in:
@@ -9,19 +9,18 @@ import toInteger from './toInteger.js';
|
||||
* size of `collection`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Collection
|
||||
* @param {Array|Object} collection The collection to sample.
|
||||
* @param {number} [n=1] The number of elements to sample.
|
||||
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
||||
* @param- {Object} [guard] Enables use as an iteratee for methods like `map`.
|
||||
* @returns {Array} Returns the random elements.
|
||||
* @example
|
||||
*
|
||||
* _.sampleSize([1, 2, 3], 2);
|
||||
* sampleSize([1, 2, 3], 2);
|
||||
* // => [3, 1]
|
||||
*
|
||||
* _.sampleSize([1, 2, 3], 4);
|
||||
* sampleSize([1, 2, 3], 4);
|
||||
* // => [2, 3, 1]
|
||||
*/
|
||||
function sampleSize(collection, n, guard) {
|
||||
|
||||
Reference in New Issue
Block a user