(a, b)
| 362 | } |
| 363 | |
| 364 | function breadthFirstCompareChild(a, b) { |
| 365 | |
| 366 | // If a is a container not reference-equal to b, postpone the comparison to the |
| 367 | // end of the pairs queue -- unless (a, b) has been seen before, in which case skip |
| 368 | // over the pair. |
| 369 | if (a === b) { |
| 370 | return true; |
| 371 | } |
| 372 | if (!isContainer(a)) { |
| 373 | return typeEquiv(a, b); |
| 374 | } |
| 375 | if (pairs.every(function (pair) { |
| 376 | return pair.a !== a || pair.b !== b; |
| 377 | })) { |
| 378 | |
| 379 | // Not yet started comparing this pair |
| 380 | pairs.push({ a: a, b: b }); |
| 381 | } |
| 382 | return true; |
| 383 | } |
| 384 | |
| 385 | var callbacks = { |
| 386 | "string": useStrictEquality, |
no test coverage detected