MCPcopy Index your code
hub / github.com/nodejs/node / deepObjectEquals

Function deepObjectEquals

deps/v8/test/mjsunit/mjsunit.js:423–441  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

421
422
423 function deepObjectEquals(a, b) {
424 // Note: This function does not check prototype equality.
425
426 // For now, treat two objects the same even if some property is configured
427 // differently (configurable, enumerable, writable).
428 var aProps = Object.getOwnPropertyNames(a);
429 aProps.sort();
430 var bProps = Object.getOwnPropertyNames(b);
431 bProps.sort();
432 if (!deepEquals(aProps, bProps)) {
433 return false;
434 }
435 for (var i = 0; i < aProps.length; i++) {
436 if (!deepEquals(a[aProps[i]], b[aProps[i]])) {
437 return false;
438 }
439 }
440 return true;
441 }
442
443 deepEquals = function deepEquals(a, b) {
444 if (a === b) {

Callers 1

mjsunit.jsFile · 0.70

Calls 2

sortMethod · 0.80
deepEqualsFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…