MCPcopy Index your code
hub / github.com/microsoft/SandDance / exactEquals

Function exactEquals

docs/app/js/sanddance-app.js:69489–69503  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

69487 }
69488}
69489function exactEquals(a, b) {
69490 if (a === b) return true;
69491 if (a && typeof a === "object" && b && typeof b === "object") {
69492 if (a.constructor !== b.constructor) return false;
69493 if (a.exactEquals) return a.exactEquals(b);
69494 }
69495 if (isArray(a) && isArray(b)) {
69496 if (a.length !== b.length) return false;
69497 for(let i = 0; i < a.length; ++i){
69498 if (!exactEquals(a[i], b[i])) return false;
69499 }
69500 return true;
69501 }
69502 return false;
69503}
69504function withEpsilon(epsilon, func) {
69505 const oldPrecision = config.EPSILON;
69506 config.EPSILON = epsilon;

Callers

nothing calls this directly

Calls 2

isArrayFunction · 0.70
exactEqualsMethod · 0.45

Tested by

no test coverage detected