(a, b)
| 421 | |
| 422 | |
| 423 | function deepObjectEquals(a, b) { |
| 424 | // Note: This function does not check prototype equality. |
| 425 | |
| 426 | // For now, treat two objects the same even if some property is configured |
| 427 | // differently (configurable, enumerable, writable). |
| 428 | var aProps = Object.getOwnPropertyNames(a); |
| 429 | aProps.sort(); |
| 430 | var bProps = Object.getOwnPropertyNames(b); |
| 431 | bProps.sort(); |
| 432 | if (!deepEquals(aProps, bProps)) { |
| 433 | return false; |
| 434 | } |
| 435 | for (var i = 0; i < aProps.length; i++) { |
| 436 | if (!deepEquals(a[aProps[i]], b[aProps[i]])) { |
| 437 | return false; |
| 438 | } |
| 439 | } |
| 440 | return true; |
| 441 | } |
| 442 | |
| 443 | deepEquals = function deepEquals(a, b) { |
| 444 | if (a === b) { |
no test coverage detected
searching dependent graphs…