MCPcopy Create free account
hub / github.com/nodejs/node / entriesEquals

Function entriesEquals

deps/v8/tools/system-analyzer/helper.mjs:67–80  ·  view source on GitHub ↗
(left, right)

Source from the content-addressed store, hash-verified

65}
66
67export function entriesEquals(left, right) {
68 if (left == right) return true;
69 if (left == undefined) return right == undefined;
70 const leftEntries = Object.entries(left);
71 const rightEntries = Object.entries(right);
72 if (leftEntries.length !== rightEntries.length) return false;
73 for (let i = 0; i < leftEntries.length; i++) {
74 const l = leftEntries[i];
75 const r = rightEntries[i];
76 if (l[0] != r[0]) return false;
77 if (l[1] != r[1]) return false;
78 }
79 return true;
80}
81
82export function keysEquals(left, right) {
83 if (left == right) return true;

Callers 1

propertyDictMethod · 0.90

Calls 1

entriesMethod · 0.45

Tested by

no test coverage detected