mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 10:27:49 +00:00
Remove references to _.
This commit is contained in:
@@ -12,29 +12,28 @@ import isArray from './isArray.js';
|
||||
* (accumulator, value, index|key, collection).
|
||||
*
|
||||
* Many lodash methods are guarded to work as iteratees for methods like
|
||||
* `_.reduce`, `_.reduceRight`, and `_.transform`.
|
||||
* `reduce`, `reduceRight`, and `transform`.
|
||||
*
|
||||
* The guarded methods are:
|
||||
* `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
|
||||
* and `sortBy`
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Collection
|
||||
* @param {Array|Object} collection The collection to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @param {*} [accumulator] The initial value.
|
||||
* @returns {*} Returns the accumulated value.
|
||||
* @see _.reduceRight
|
||||
* @see reduceRight
|
||||
* @example
|
||||
*
|
||||
* _.reduce([1, 2], function(sum, n) {
|
||||
* reduce([1, 2], function(sum, n) {
|
||||
* return sum + n;
|
||||
* }, 0);
|
||||
* // => 3
|
||||
*
|
||||
* _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
|
||||
* reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
|
||||
* (result[value] || (result[value] = [])).push(key);
|
||||
* return result;
|
||||
* }, {});
|
||||
|
||||
Reference in New Issue
Block a user