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

Function deepObjectEquals

deps/v8/test/intl/assert.js:42–56  ·  view source on GitHub ↗

* Compares two objects for key/value equality. * Returns true if they are equal, false otherwise.

(a, b)

Source from the content-addressed store, hash-verified

40 * Returns true if they are equal, false otherwise.
41 */
42function deepObjectEquals(a, b) {
43 var aProps = Object.keys(a);
44 aProps.sort();
45 var bProps = Object.keys(b);
46 bProps.sort();
47 if (!deepEquals(aProps, bProps)) {
48 return false;
49 }
50 for (var i = 0; i < aProps.length; i++) {
51 if (!deepEquals(a[aProps[i]], b[aProps[i]])) {
52 return false;
53 }
54 }
55 return true;
56}
57
58
59/**

Callers 1

deepEqualsFunction · 0.70

Calls 3

sortMethod · 0.80
deepEqualsFunction · 0.70
keysMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…