Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lodash.reduce

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.reduce - npm Package Compare versions

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.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc