lodash.reduce
Advanced tools
Comparing version 4.0.0 to 4.0.1
20
index.js
/** | ||
* lodash 4.0.0 (Custom Build) <https://lodash.com/> | ||
* lodash 4.0.1 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modularize exports="npm" -o ./` | ||
@@ -43,10 +43,10 @@ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/> | ||
* @param {*} [accumulator] The initial value. | ||
* @param {boolean} [initFromArray] Specify using the first element of `array` as the initial value. | ||
* @param {boolean} [initAccum] Specify using the first element of `array` as the initial value. | ||
* @returns {*} Returns the accumulated value. | ||
*/ | ||
function arrayReduce(array, iteratee, accumulator, initFromArray) { | ||
function arrayReduce(array, iteratee, accumulator, initAccum) { | ||
var index = -1, | ||
length = array.length; | ||
if (initFromArray && length) { | ||
if (initAccum && length) { | ||
accumulator = array[++index]; | ||
@@ -70,7 +70,7 @@ } | ||
/** Built-in value references. */ | ||
var _Symbol = global.Symbol; | ||
var Symbol = global.Symbol; | ||
/** Used to convert symbols to primitives and strings. */ | ||
var symbolProto = _Symbol ? _Symbol.prototype : undefined, | ||
symbolToString = _Symbol ? symbolProto.toString : undefined; | ||
var symbolProto = Symbol ? Symbol.prototype : undefined, | ||
symbolToString = Symbol ? symbolProto.toString : undefined; | ||
@@ -299,5 +299,5 @@ /** | ||
var func = isArray(collection) ? arrayReduce : baseReduce, | ||
initFromCollection = arguments.length < 3; | ||
initAccum = arguments.length < 3; | ||
return func(collection, baseIteratee(iteratee, 4), accumulator, initFromCollection, baseEach); | ||
return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach); | ||
} | ||
@@ -437,3 +437,3 @@ | ||
if (isSymbol(value)) { | ||
return _Symbol ? symbolToString.call(value) : ''; | ||
return Symbol ? symbolToString.call(value) : ''; | ||
} | ||
@@ -440,0 +440,0 @@ var result = (value + ''); |
{ | ||
"name": "lodash.reduce", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "The lodash method `_.reduce` exported as a module.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/", |
@@ -1,2 +0,2 @@ | ||
# lodash.reduce v4.0.0 | ||
# lodash.reduce v4.0.1 | ||
@@ -18,2 +18,2 @@ The [lodash](https://lodash.com/) method `_.reduce` exported as a [Node.js](https://nodejs.org/) module. | ||
See the [documentation](https://lodash.com/docs#reduce) or [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash.reduce) for more details. | ||
See the [documentation](https://lodash.com/docs#reduce) or [package source](https://github.com/lodash/lodash/blob/4.0.1-npm-packages/lodash.reduce) for more details. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
15690