{"ScriptPreparationCode":"function equal(a, b) {\r\n if (a === b) return true;\r\n\r\n if (a \u0026\u0026 b \u0026\u0026 typeof a == \u0027object\u0027 \u0026\u0026 typeof b == \u0027object\u0027) {\r\n if (a.constructor !== b.constructor) return false;\r\n\r\n var length, i, keys;\r\n if (Array.isArray(a)) {\r\n length = a.length;\r\n if (length != b.length) return false;\r\n for (i = length; i-- !== 0;)\r\n if (!equal(a[i], b[i])) return false;\r\n return true;\r\n }\r\n\r\n\r\n\r\n if (a.constructor === RegExp) return a.source === b.source \u0026\u0026 a.flags === b.flags;\r\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\r\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\r\n\r\n keys = Object.keys(a);\r\n length = keys.length;\r\n if (length !== Object.keys(b).length) return false;\r\n\r\n for (i = length; i-- !== 0;)\r\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\r\n\r\n for (i = length; i-- !== 0;) {\r\n var key = keys[i];\r\n\r\n if (!equal(a[key], b[key])) return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n // true if both NaN, false otherwise\r\n return a!==a \u0026\u0026 b!==b;\r\n};\r\n\r\n// 5 levels deep\r\nwindow.foo5 = { a: 1, b: 2, c: { a: 1, b: 2, c: { a: 1, b: 2, c: { a: 1, b: 2, c: { a: 1, b: 2 } } } } };\r\nwindow.bar5 = { a: 1, b: 2, c: { a: 1, b: 2, c: { a: 1, b: 2, c: { a: 1, b: 2, c: { a: 1, b: 4 } } } } };","TestCases":[{"Name":"underscore.isEqual Level 5","Code":"underscore.isEqual(window.foo5, window.bar5)","IsDeferred":false},{"Name":"fast-deep-equal.isEqual Level 5","Code":"equal(window.foo5, window.bar5);","IsDeferred":false}]}