(actual, expected)
| 1282 | }; |
| 1283 | |
| 1284 | function _deepEqual(actual, expected) { |
| 1285 | // 7.1. All identical values are equivalent, as determined by ===. |
| 1286 | if (actual === expected) { |
| 1287 | return true; |
| 1288 | // 7.2. If the expected value is a Date object, the actual value is |
| 1289 | // equivalent if it is also a Date object that refers to the same time. |
| 1290 | } else if (actual instanceof Date && expected instanceof Date) { |
| 1291 | return actual.getTime() === expected.getTime(); |
| 1292 | |
| 1293 | // 7.3. Other pairs that do not both pass typeof value == "object", |
| 1294 | // equivalence is determined by ==. |
| 1295 | } else if (typeof actual != 'object' && typeof expected != 'object') { |
| 1296 | return actual == expected; |
| 1297 | |
| 1298 | // 7.4. For all other Object pairs, including Array objects, equivalence is |
| 1299 | // determined by having the same number of owned properties (as verified |
| 1300 | // with Object.prototype.hasOwnProperty.call), the same set of keys |
| 1301 | // (although not necessarily the same order), equivalent values for every |
| 1302 | // corresponding key, and an identical "prototype" property. Note: this |
| 1303 | // accounts for both named and indexed properties on Arrays. |
| 1304 | } else { |
| 1305 | return objEquiv(actual, expected); |
| 1306 | } |
| 1307 | } |
| 1308 | |
| 1309 | function isUndefinedOrNull (value) { |
| 1310 | return value === null || value === undefined; |
no test coverage detected
searching dependent graphs…