{"ScriptPreparationCode":"var base = {};\r\nbase.deepEquals = function(a, b) {\r\n if (typeof a != typeof b) {\r\n return false;\r\n }\r\n\r\n if (typeof a != \u0022object\u0022) {\r\n return a == b;\r\n }\r\n\r\n if (a instanceof Array) {\r\n if (!(b instanceof Array)) {\r\n return false;\r\n }\r\n\r\n if (a.length != b.length) {\r\n return false;\r\n }\r\n\r\n for (var i = 0; i \u003C a.length; i\u002B\u002B) {\r\n if (!base.deepEquals(a[i], b[i])) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n var aKeyCount = 0;\r\n for (var key in a) {\r\n aKeyCount\u002B\u002B;\r\n if (!(key in b)) {\r\n return false;\r\n }\r\n\r\n if (!base.deepEquals(a[key], b[key])) {\r\n return false;\r\n }\r\n }\r\n\r\n var bKeyCount = 0;\r\n for (var key in b) {\r\n if (!(key in a)) {\r\n return false;\r\n }\r\n bKeyCount\u002B\u002B;\r\n }\r\n\r\n return aKeyCount == bKeyCount;\r\n};\r\n\r\n Object.prototype.equals = function (x, deep) {\r\n if (deep) {\r\n if (x == this) return true;\r\n\r\n var p;\r\n for (p in this) {\r\n if (typeof (x[p]) == \u0027undefined\u0027) { return false; }\r\n }\r\n\r\n for (p in this) {\r\n if (this[p]) {\r\n switch (typeof (this[p])) {\r\n case \u0027object\u0027:\r\n if (!this[p].equals(x[p])) { return false; } break;\r\n case \u0027function\u0027:\r\n if (typeof (x[p]) == \u0027undefined\u0027 ||\r\n (p != \u0027equals\u0027 \u0026\u0026 this[p].toString() != x[p].toString()))\r\n return false;\r\n break;\r\n default:\r\n if (this[p] != x[p]) { return false; }\r\n }\r\n } else {\r\n if (x[p])\r\n return false;\r\n }\r\n }\r\n\r\n for (p in x) {\r\n if (typeof (this[p]) == \u0027undefined\u0027) { return false; }\r\n }\r\n\r\n return true;\r\n }\r\n return x == this;\r\n }\r\n\r\nbase.stringifyEquals = function(a, b) {\r\n return JSON.stringify(a) === JSON.stringify(b);\r\n};\r\n\r\na = {\r\n tableHeight: 50,\r\n topOffsets: [1, 2, 3, 4, 5]\r\n};\r\nb = {\r\n tableHeight: 50,\r\n topOffsets: [1, 2, 3, 4, 5]\r\n};\r\n\r\n\r\n\r\n","TestCases":[{"Name":"deepEquals","Code":"base.deepEquals(a, b)","IsDeferred":false},{"Name":"stringifyEquals","Code":"base.stringifyEquals(a, b)","IsDeferred":false},{"Name":"Object.prototype.equals","Code":"a.equals(b, true)","IsDeferred":false},{"Name":"Lodash isEqual","Code":"lodash.isEqual(a,b)","IsDeferred":false},{"Name":"underscore isequal","Code":"underscore.isEqual(a,b)","IsDeferred":false}]}