mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 18:37:50 +00:00
Tweak docs for "_.pluck" and "_.where" style callbacks.
Former-commit-id: 8ee7906ac1839c2675a5e82749c9a2c86cf6f49a
This commit is contained in:
80
lodash.js
80
lodash.js
@@ -2235,8 +2235,8 @@
|
||||
* @category Collections
|
||||
* @param {Array|Object|String} collection The collection to iterate over.
|
||||
* @param {Function|Object|String} [callback=identity] The function called per
|
||||
* iteration. If a string or object is passed, it will be used to create a
|
||||
* "_.pluck" or "_.where" style callback, respectively.
|
||||
* iteration. If a property name or object is passed, it will be used to create
|
||||
* a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Object} Returns the composed aggregate object.
|
||||
* @example
|
||||
@@ -2279,8 +2279,8 @@
|
||||
* @category Collections
|
||||
* @param {Array|Object|String} collection The collection to iterate over.
|
||||
* @param {Function|Object|String} [callback=identity] The function called per
|
||||
* iteration. If a string or object is passed, it will be used to create a
|
||||
* "_.pluck" or "_.where" style callback, respectively.
|
||||
* iteration. If a property name or object is passed, it will be used to create
|
||||
* a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Boolean} Returns `true` if all elements pass the callback check,
|
||||
* else `false`.
|
||||
@@ -2341,8 +2341,8 @@
|
||||
* @category Collections
|
||||
* @param {Array|Object|String} collection The collection to iterate over.
|
||||
* @param {Function|Object|String} [callback=identity] The function called per
|
||||
* iteration. If a string or object is passed, it will be used to create a
|
||||
* "_.pluck" or "_.where" style callback, respectively.
|
||||
* iteration. If a property name or object is passed, it will be used to create
|
||||
* a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Array} Returns a new array of elements that passed the callback check.
|
||||
* @example
|
||||
@@ -2405,8 +2405,8 @@
|
||||
* @category Collections
|
||||
* @param {Array|Object|String} collection The collection to iterate over.
|
||||
* @param {Function|Object|String} [callback=identity] The function called per
|
||||
* iteration. If a string or object is passed, it will be used to create a
|
||||
* "_.pluck" or "_.where" style callback, respectively.
|
||||
* iteration. If a property name or object is passed, it will be used to create
|
||||
* a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Mixed} Returns the element that passed the callback check,
|
||||
* else `undefined`.
|
||||
@@ -2499,8 +2499,8 @@
|
||||
* @category Collections
|
||||
* @param {Array|Object|String} collection The collection to iterate over.
|
||||
* @param {Function|Object|String} [callback=identity] The function called per
|
||||
* iteration. If a string or object is passed, it will be used to create a
|
||||
* "_.pluck" or "_.where" style callback, respectively.
|
||||
* iteration. If a property name or object is passed, it will be used to create
|
||||
* a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Object} Returns the composed aggregate object.
|
||||
* @example
|
||||
@@ -2579,8 +2579,8 @@
|
||||
* @category Collections
|
||||
* @param {Array|Object|String} collection The collection to iterate over.
|
||||
* @param {Function|Object|String} [callback=identity] The function called per
|
||||
* iteration. If a string or object is passed, it will be used to create a
|
||||
* "_.pluck" or "_.where" style callback, respectively.
|
||||
* iteration. If a property name or object is passed, it will be used to create
|
||||
* a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Array} Returns a new array of the results of each `callback` execution.
|
||||
* @example
|
||||
@@ -2636,8 +2636,8 @@
|
||||
* @category Collections
|
||||
* @param {Array|Object|String} collection The collection to iterate over.
|
||||
* @param {Function|Object|String} [callback=identity] The function called per
|
||||
* iteration. If a string or object is passed, it will be used to create a
|
||||
* "_.pluck" or "_.where" style callback, respectively.
|
||||
* iteration. If a property name or object is passed, it will be used to create
|
||||
* a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Mixed} Returns the maximum value.
|
||||
* @example
|
||||
@@ -2705,8 +2705,8 @@
|
||||
* @category Collections
|
||||
* @param {Array|Object|String} collection The collection to iterate over.
|
||||
* @param {Function|Object|String} [callback=identity] The function called per
|
||||
* iteration. If a string or object is passed, it will be used to create a
|
||||
* "_.pluck" or "_.where" style callback, respectively.
|
||||
* iteration. If a property name or object is passed, it will be used to create
|
||||
* a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Mixed} Returns the minimum value.
|
||||
* @example
|
||||
@@ -2888,8 +2888,8 @@
|
||||
* @category Collections
|
||||
* @param {Array|Object|String} collection The collection to iterate over.
|
||||
* @param {Function|Object|String} [callback=identity] The function called per
|
||||
* iteration. If a string or object is passed, it will be used to create a
|
||||
* "_.pluck" or "_.where" style callback, respectively.
|
||||
* iteration. If a property name or object is passed, it will be used to create
|
||||
* a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Array} Returns a new array of elements that did **not** pass the
|
||||
* callback check.
|
||||
@@ -2989,8 +2989,8 @@
|
||||
* @category Collections
|
||||
* @param {Array|Object|String} collection The collection to iterate over.
|
||||
* @param {Function|Object|String} [callback=identity] The function called per
|
||||
* iteration. If a string or object is passed, it will be used to create a
|
||||
* "_.pluck" or "_.where" style callback, respectively.
|
||||
* iteration. If a property name or object is passed, it will be used to create
|
||||
* a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Boolean} Returns `true` if any element passes the callback check,
|
||||
* else `false`.
|
||||
@@ -3052,8 +3052,8 @@
|
||||
* @category Collections
|
||||
* @param {Array|Object|String} collection The collection to iterate over.
|
||||
* @param {Function|Object|String} [callback=identity] The function called per
|
||||
* iteration. If a string or object is passed, it will be used to create a
|
||||
* "_.pluck" or "_.where" style callback, respectively.
|
||||
* iteration. If a property name or object is passed, it will be used to create
|
||||
* a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Array} Returns a new array of sorted elements.
|
||||
* @example
|
||||
@@ -3217,9 +3217,10 @@
|
||||
* @alias head, take
|
||||
* @category Arrays
|
||||
* @param {Array} array The array to query.
|
||||
* @param {Function|Object|Number|String} [callback|n] The function called per
|
||||
* element or the number of elements to return. If a string or object is passed,
|
||||
* it will be used to create a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Function|Object|Number|String} [callback|n] The function called
|
||||
* per element or the number of elements to return. If a property name or
|
||||
* object is passed, it will be used to create a "_.pluck" or "_.where"
|
||||
* style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Mixed} Returns the first element(s) of `array`.
|
||||
* @example
|
||||
@@ -3371,9 +3372,10 @@
|
||||
* @memberOf _
|
||||
* @category Arrays
|
||||
* @param {Array} array The array to query.
|
||||
* @param {Function|Object|Number|String} [callback|n=1] The function called per
|
||||
* element or the number of elements to exclude. If a string or object is passed,
|
||||
* it will be used to create a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Function|Object|Number|String} [callback|n=1] The function called
|
||||
* per element or the number of elements to exclude. If a property name or
|
||||
* object is passed, it will be used to create a "_.pluck" or "_.where"
|
||||
* style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Array} Returns a slice of `array`.
|
||||
* @example
|
||||
@@ -3495,9 +3497,10 @@
|
||||
* @memberOf _
|
||||
* @category Arrays
|
||||
* @param {Array} array The array to query.
|
||||
* @param {Function|Object|Number|String} [callback|n] The function called per
|
||||
* element or the number of elements to return. If a string or object is passed,
|
||||
* it will be used to create a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Function|Object|Number|String} [callback|n] The function called
|
||||
* per element or the number of elements to return. If a property name or
|
||||
* object is passed, it will be used to create a "_.pluck" or "_.where"
|
||||
* style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Mixed} Returns the last element(s) of `array`.
|
||||
* @example
|
||||
@@ -3687,9 +3690,10 @@
|
||||
* @alias drop, tail
|
||||
* @category Arrays
|
||||
* @param {Array} array The array to query.
|
||||
* @param {Function|Object|Number|String} [callback|n=1] The function called per
|
||||
* element or the number of elements to exclude. If a string or object is passed,
|
||||
* it will be used to create a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Function|Object|Number|String} [callback|n=1] The function called
|
||||
* per element or the number of elements to exclude. If a property name or
|
||||
* object is passed, it will be used to create a "_.pluck" or "_.where"
|
||||
* style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Array} Returns a slice of `array`.
|
||||
* @example
|
||||
@@ -3760,8 +3764,8 @@
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @param {Mixed} value The value to evaluate.
|
||||
* @param {Function|Object|String} [callback=identity] The function called per
|
||||
* iteration. If a string or object is passed, it will be used to create a
|
||||
* "_.pluck" or "_.where" style callback, respectively.
|
||||
* iteration. If a property name or object is passed, it will be used to create
|
||||
* a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Number} Returns the index at which the value should be inserted
|
||||
* into `array`.
|
||||
@@ -3845,8 +3849,8 @@
|
||||
* @param {Array} array The array to process.
|
||||
* @param {Boolean} [isSorted=false] A flag to indicate that the `array` is already sorted.
|
||||
* @param {Function|Object|String} [callback=identity] The function called per
|
||||
* iteration. If a string or object is passed, it will be used to create a
|
||||
* "_.pluck" or "_.where" style callback, respectively.
|
||||
* iteration. If a property name or object is passed, it will be used to create
|
||||
* a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Array} Returns a duplicate-value-free array.
|
||||
* @example
|
||||
|
||||
Reference in New Issue
Block a user