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

Function equalArray

docs/tests/v3/es6/js/sanddance-test-es6.js:90863–90868  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

90861 return a === b || a !== a && b !== b ? true : (0, _vegaUtil.isArray)(a) ? (0, _vegaUtil.isArray)(b) && a.length === b.length ? equalArray(a, b) : false : (0, _vegaUtil.isObject)(a) && (0, _vegaUtil.isObject)(b) ? equalObject(a, b) : false;
90862}
90863function equalArray(a, b) {
90864 for(let i = 0, n = a.length; i < n; ++i){
90865 if (!equal(a[i], b[i])) return false;
90866 }
90867 return true;
90868}
90869function equalObject(a, b) {
90870 for(const key in a){
90871 if (!equal(a[key], b[key])) return false;

Callers 1

equalFunction · 0.70

Calls 1

equalFunction · 0.70

Tested by

no test coverage detected