From e63d7ff9d56ea11f6928e3fef86bdb0cfee40ff5 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 3 Sep 2015 12:58:42 -0700 Subject: [PATCH] Rename var `initFromArray` to `initFromCollection` in `_.reduce` and `_.reduceRight`. --- lodash.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lodash.js b/lodash.js index 84c7eed10..be0c95106 100644 --- a/lodash.js +++ b/lodash.js @@ -6610,10 +6610,10 @@ * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) */ function reduce(collection, iteratee, accumulator) { - var initFromArray = arguments.length < 3; + var initFromCollection = arguments.length < 3; return (typeof iteratee == 'function' && isArray(collection)) - ? arrayReduce(collection, iteratee, accumulator, initFromArray) - : baseReduce(collection, getIteratee(iteratee, 4), accumulator, initFromArray, baseEach); + ? arrayReduce(collection, iteratee, accumulator, initFromCollection) + : baseReduce(collection, getIteratee(iteratee, 4), accumulator, initFromCollection, baseEach); } /** @@ -6637,10 +6637,10 @@ * // => [4, 5, 2, 3, 0, 1] */ function reduceRight(collection, iteratee, accumulator) { - var initFromArray = arguments.length < 3; + var initFromCollection = arguments.length < 3; return (typeof iteratee == 'function' && isArray(collection)) - ? arrayReduceRight(collection, iteratee, accumulator, initFromArray) - : baseReduce(collection, getIteratee(iteratee, 4), accumulator, initFromArray, baseEachRight); + ? arrayReduceRight(collection, iteratee, accumulator, initFromCollection) + : baseReduce(collection, getIteratee(iteratee, 4), accumulator, initFromCollection, baseEachRight); } /**