MCPcopy Create free account
hub / github.com/microsoft/SandDance / objectEqual

Function objectEqual

docs/tests/v2/es6/js/sanddance.js:102776–102795  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

102774}
102775
102776function objectEqual(a, b) {
102777 var ka = Object.keys(a),
102778 kb = Object.keys(b),
102779 key,
102780 i;
102781 if (ka.length !== kb.length) return false;
102782 ka.sort();
102783 kb.sort();
102784
102785 for (i = ka.length - 1; i >= 0; i--) {
102786 if (ka[i] != kb[i]) return false;
102787 }
102788
102789 for (i = ka.length - 1; i >= 0; i--) {
102790 key = ka[i];
102791 if (!sceneEqual(a[key], b[key], key)) return false;
102792 }
102793
102794 return typeof a === typeof b;
102795}
102796},{"../path/parse":"ANC8","vega-util":"d61Z"}],"AgKg":[function(require,module,exports) {
102797"use strict";
102798

Callers 1

sceneEqualFunction · 0.70

Calls 1

sceneEqualFunction · 0.70

Tested by

no test coverage detected