Socket
Socket
Sign inDemoInstall

lodash._baseisequal

Package Overview
Dependencies
Maintainers
4
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash._baseisequal - npm Package Compare versions

Comparing version 2.4.0 to 2.4.1

71

index.js
/**
* Lo-Dash 2.4.0 (Custom Build) <http://lodash.com/>
* Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
* Build: `lodash modularize modern exports="npm" -o ./npm/`

@@ -154,47 +154,50 @@ * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>

if (isArr) {
// compare lengths to determine if a deep comparison is necessary
length = a.length;
size = b.length;
result = size == length;
// compare lengths to determine if a deep comparison is necessary
result = size == a.length;
if (!result && !isWhere) {
return result;
}
// deep compare the contents, ignoring non-numeric properties
while (size--) {
var index = length,
value = b[size];
if (result || isWhere) {
// deep compare the contents, ignoring non-numeric properties
while (size--) {
var index = length,
value = b[size];
if (isWhere) {
while (index--) {
if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) {
break;
if (isWhere) {
while (index--) {
if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) {
break;
}
}
} else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) {
break;
}
} else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) {
break;
}
}
return result;
}
// deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys`
// which, in this case, is more costly
forIn(b, function(value, key, b) {
if (hasOwnProperty.call(b, key)) {
// count the number of properties.
size++;
// deep compare each property value.
return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB));
}
});
if (result && !isWhere) {
// ensure both objects have the same number of properties
forIn(a, function(value, key, a) {
if (hasOwnProperty.call(a, key)) {
// `size` will be `-1` if `a` has more properties than `b`
return (result = --size > -1);
else {
// deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys`
// which, in this case, is more costly
forIn(b, function(value, key, b) {
if (hasOwnProperty.call(b, key)) {
// count the number of properties.
size++;
// deep compare each property value.
return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB));
}
});
if (result && !isWhere) {
// ensure both objects have the same number of properties
forIn(a, function(value, key, a) {
if (hasOwnProperty.call(a, key)) {
// `size` will be `-1` if `a` has more properties than `b`
return (result = --size > -1);
}
});
}
}
stackA.pop();
stackB.pop();
if (initedStack) {

@@ -201,0 +204,0 @@ releaseArray(stackA);

{
"name": "lodash._baseisequal",
"version": "2.4.0",
"version": "2.4.1",
"description": "The internal Lo-Dash function `baseIsEqual` as a Node.js module generated by lodash-cli.",

@@ -17,8 +17,8 @@ "homepage": "http://lodash.com/custom-builds",

"dependencies": {
"lodash.forin": "~2.4.0",
"lodash._getarray": "~2.4.0",
"lodash.isfunction": "~2.4.0",
"lodash._objecttypes": "~2.4.0",
"lodash._releasearray": "~2.4.0"
"lodash.forin": "~2.4.1",
"lodash._getarray": "~2.4.1",
"lodash.isfunction": "~2.4.1",
"lodash._objecttypes": "~2.4.1",
"lodash._releasearray": "~2.4.1"
}
}

@@ -1,2 +0,2 @@

# lodash._baseisequal v2.4.0
# lodash._baseisequal v2.4.1

@@ -3,0 +3,0 @@ The internal [Lo-Dash](http://lodash.com/) function `baseIsEqual` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).

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