MCPcopy Create free account
hub / github.com/jipegit/OSXAuditor / pathEqual

Function pathEqual

d3-3.2.8/test/assert.js:111–128  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

109}
110
111function pathEqual(a, b) {
112 a = parsePath(a);
113 b = parsePath(b);
114 var n = a.length, i = -1, x, y;
115 if (n !== b.length) return false;
116 while (++i < n) {
117 x = a[i];
118 y = b[i];
119 if (typeof x === "string") {
120 if (x !== y) return false;
121 } else if (typeof y !== "number") {
122 return false;
123 } else if (Math.abs(x - y) > 1e-6) {
124 return false;
125 }
126 }
127 return true;
128}
129
130var reNumber = /[-+]?(?:\d+\.\d+|\d+\.|\.\d+|\d+)(?:[eE][-]?\d+)?/g;
131

Callers 1

assert.jsFile · 0.85

Calls 1

parsePathFunction · 0.85

Tested by

no test coverage detected