(a, b)
| 109 | } |
| 110 | |
| 111 | function 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 | |
| 130 | var reNumber = /[-+]?(?:\d+\.\d+|\d+\.|\.\d+|\d+)(?:[eE][-]?\d+)?/g; |
| 131 |