MCPcopy Index your code
hub / github.com/caseywebdev/react-list / shallowEqual

Function shallowEqual

docs/index.js:5564–5585  ·  view source on GitHub ↗
(objA, objB)

Source from the content-addressed store, hash-verified

5562}
5563var objectIs = "function" === typeof Object.is ? Object.is : is;
5564function shallowEqual(objA, objB) {
5565 if (objectIs(objA, objB)) return !0;
5566 if (
5567 "object" !== typeof objA ||
5568 null === objA ||
5569 "object" !== typeof objB ||
5570 null === objB
5571 )
5572 return !1;
5573 var keysA = Object.keys(objA),
5574 keysB = Object.keys(objB);
5575 if (keysA.length !== keysB.length) return !1;
5576 for (keysB = 0; keysB < keysA.length; keysB++) {
5577 var currentKey = keysA[keysB];
5578 if (
5579 !hasOwnProperty.call(objB, currentKey) ||
5580 !objectIs(objA[currentKey], objB[currentKey])
5581 )
5582 return !1;
5583 }
5584 return !0;
5585}
5586function getLeafNode(node) {
5587 for (; node && node.firstChild; ) node = node.firstChild;
5588 return node;

Callers 3

constructSelectEventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…