{"ScriptPreparationCode":"function is(x, y) {\r\n return (\r\n (x === y \u0026\u0026 (x !== 0 || 1 / x === 1 / y)) || (x !== x \u0026\u0026 y !== y) // eslint-disable-line no-self-compare\r\n );\r\n}\r\n\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\r\n\r\nfunction shallowEqual(objA, objB) {\r\n if (is(objA, objB)) {\r\n return true;\r\n }\r\n\r\n if (\r\n typeof objA !== \u0027object\u0027 ||\r\n objA === null ||\r\n typeof objB !== \u0027object\u0027 ||\r\n objB === null\r\n ) {\r\n return false;\r\n }\r\n\r\n const keysA = Object.keys(objA);\r\n const keysB = Object.keys(objB);\r\n\r\n if (keysA.length !== keysB.length) {\r\n return false;\r\n }\r\n\r\n // Test for A\u0027s keys different from B.\r\n for (let i = 0; i \u003C keysA.length; i\u002B\u002B) {\r\n const currentKey = keysA[i];\r\n if (\r\n !hasOwnProperty.call(objB, currentKey) ||\r\n !is(objA[currentKey], objB[currentKey])\r\n ) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n}\r\n\r\nvar data = [{\r\n foo: {\r\n bar: {\r\n foo: {\r\n bar: \u0027\u0027\r\n }\r\n }\r\n }\r\n}, {}, {}];","TestCases":[{"Name":"Ramda equals","Code":"var result = R.equals(data, [{foo: {bar: {foo: {bar: \u0027\u0027}}}}, {}, {}]);","IsDeferred":false},{"Name":"React shallowEqual","Code":"var result = shallowEqual(data, [{foo: {bar: {foo: {bar: \u0027\u0027}}}}, {}, {}]);","IsDeferred":false}]}