Repository URL to install this package:
Version:
2.0.11-8 ▾
|
notion-desktop
/
usr
/
lib
/
notion-desktop
/
resources
/
app
/
node_modules
/
shallow-equal
/
objects
/
index.js
|
---|
'use strict';
function shallowEqualObjects(objA, objB) {
if (objA === objB) {
return true;
}
if (!objA || !objB) {
return false;
}
var aKeys = Object.keys(objA);
var bKeys = Object.keys(objB);
var len = aKeys.length;
if (bKeys.length !== len) {
return false;
}
for (var i = 0; i < len; i++) {
var key = aKeys[i];
if (objA[key] !== objB[key] || !Object.prototype.hasOwnProperty.call(objB, key)) {
return false;
}
}
return true;
}
module.exports = shallowEqualObjects;