Socket
Socket
Sign inDemoInstall

shallowequal

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

16

index.js
module.exports = function shallowEqual(objA, objB, compare, compareContext) {
let ret = compare ? compare.call(compareContext, objA, objB) : void 0;
var ret = compare ? compare.call(compareContext, objA, objB) : void 0;

@@ -18,4 +18,4 @@ if(ret !== void 0) {

const keysA = Object.keys(objA);
const keysB = Object.keys(objB);
var keysA = Object.keys(objA);
var keysB = Object.keys(objB);

@@ -26,8 +26,8 @@ if(keysA.length !== keysB.length) {

const bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);
var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);
// Test for A's keys different from B.
for(let idx = 0; idx < keysA.length; idx++) {
for(var idx = 0; idx < keysA.length; idx++) {
const key = keysA[idx];
var key = keysA[idx];

@@ -38,4 +38,4 @@ if(!bHasOwnProperty(key)) {

const valueA = objA[key];
const valueB = objB[key];
var valueA = objA[key];
var valueB = objB[key];

@@ -42,0 +42,0 @@ ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;

{
"name": "shallowequal",
"version": "1.0.0",
"version": "1.0.1",
"description": "Like lodash isEqualWith but for shallow equal.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc