* Compares two objects for key/value equality. * Returns true if they are equal, false otherwise.
(a, b)
| 40 | * Returns true if they are equal, false otherwise. |
| 41 | */ |
| 42 | function deepObjectEquals(a, b) { |
| 43 | var aProps = Object.keys(a); |
| 44 | aProps.sort(); |
| 45 | var bProps = Object.keys(b); |
| 46 | bProps.sort(); |
| 47 | if (!deepEquals(aProps, bProps)) { |
| 48 | return false; |
| 49 | } |
| 50 | for (var i = 0; i < aProps.length; i++) { |
| 51 | if (!deepEquals(a[aProps[i]], b[aProps[i]])) { |
| 52 | return false; |
| 53 | } |
| 54 | } |
| 55 | return true; |
| 56 | } |
| 57 | |
| 58 | |
| 59 | /** |
no test coverage detected
searching dependent graphs…