mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 01:17:50 +00:00
Remove baseIteratee and castFunction.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import arrayReduceRight from './_arrayReduceRight.js';
|
||||
import baseEachRight from './_baseEachRight.js';
|
||||
import baseIteratee from './_baseIteratee.js';
|
||||
import baseReduce from './_baseReduce.js';
|
||||
import isArray from './isArray.js';
|
||||
|
||||
@@ -13,7 +12,7 @@ import isArray from './isArray.js';
|
||||
* @since 0.1.0
|
||||
* @category Collection
|
||||
* @param {Array|Object} collection The collection to iterate over.
|
||||
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @param {*} [accumulator] The initial value.
|
||||
* @returns {*} Returns the accumulated value.
|
||||
* @see _.reduce
|
||||
@@ -29,8 +28,7 @@ import isArray from './isArray.js';
|
||||
function reduceRight(collection, iteratee, accumulator) {
|
||||
const func = isArray(collection) ? arrayReduceRight : baseReduce;
|
||||
const initAccum = arguments.length < 3;
|
||||
|
||||
return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
|
||||
return func(collection, iteratee, accumulator, initAccum, baseEachRight);
|
||||
}
|
||||
|
||||
export default reduceRight;
|
||||
|
||||
Reference in New Issue
Block a user