322ab6f98d6329b7b32fc293e8066d7d.json
3.69 KB
{"ast":null,"code":"//\nmodule.exports = function shallowEqual(objA, objB, compare, compareContext) {\n var ret = compare ? compare.call(compareContext, objA, objB) : void 0;\n\n if (ret !== void 0) {\n return !!ret;\n }\n\n if (objA === objB) {\n return true;\n }\n\n if (typeof objA !== \"object\" || !objA || typeof objB !== \"object\" || !objB) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB); // Test for A's keys different from B.\n\n for (var idx = 0; idx < keysA.length; idx++) {\n var key = keysA[idx];\n\n if (!bHasOwnProperty(key)) {\n return false;\n }\n\n var valueA = objA[key];\n var valueB = objB[key];\n ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;\n\n if (ret === false || ret === void 0 && valueA !== valueB) {\n return false;\n }\n }\n\n return true;\n};","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/shallowequal/index.js"],"names":["module","exports","shallowEqual","objA","objB","compare","compareContext","ret","call","keysA","Object","keys","keysB","length","bHasOwnProperty","prototype","hasOwnProperty","bind","idx","key","valueA","valueB"],"mappings":"AAAA;AAEAA,MAAM,CAACC,OAAP,GAAiB,SAASC,YAAT,CAAsBC,IAAtB,EAA4BC,IAA5B,EAAkCC,OAAlC,EAA2CC,cAA3C,EAA2D;AAC1E,MAAIC,GAAG,GAAGF,OAAO,GAAGA,OAAO,CAACG,IAAR,CAAaF,cAAb,EAA6BH,IAA7B,EAAmCC,IAAnC,CAAH,GAA8C,KAAK,CAApE;;AAEA,MAAIG,GAAG,KAAK,KAAK,CAAjB,EAAoB;AAClB,WAAO,CAAC,CAACA,GAAT;AACD;;AAED,MAAIJ,IAAI,KAAKC,IAAb,EAAmB;AACjB,WAAO,IAAP;AACD;;AAED,MAAI,OAAOD,IAAP,KAAgB,QAAhB,IAA4B,CAACA,IAA7B,IAAqC,OAAOC,IAAP,KAAgB,QAArD,IAAiE,CAACA,IAAtE,EAA4E;AAC1E,WAAO,KAAP;AACD;;AAED,MAAIK,KAAK,GAAGC,MAAM,CAACC,IAAP,CAAYR,IAAZ,CAAZ;AACA,MAAIS,KAAK,GAAGF,MAAM,CAACC,IAAP,CAAYP,IAAZ,CAAZ;;AAEA,MAAIK,KAAK,CAACI,MAAN,KAAiBD,KAAK,CAACC,MAA3B,EAAmC;AACjC,WAAO,KAAP;AACD;;AAED,MAAIC,eAAe,GAAGJ,MAAM,CAACK,SAAP,CAAiBC,cAAjB,CAAgCC,IAAhC,CAAqCb,IAArC,CAAtB,CAtB0E,CAwB1E;;AACA,OAAK,IAAIc,GAAG,GAAG,CAAf,EAAkBA,GAAG,GAAGT,KAAK,CAACI,MAA9B,EAAsCK,GAAG,EAAzC,EAA6C;AAC3C,QAAIC,GAAG,GAAGV,KAAK,CAACS,GAAD,CAAf;;AAEA,QAAI,CAACJ,eAAe,CAACK,GAAD,CAApB,EAA2B;AACzB,aAAO,KAAP;AACD;;AAED,QAAIC,MAAM,GAAGjB,IAAI,CAACgB,GAAD,CAAjB;AACA,QAAIE,MAAM,GAAGjB,IAAI,CAACe,GAAD,CAAjB;AAEAZ,IAAAA,GAAG,GAAGF,OAAO,GAAGA,OAAO,CAACG,IAAR,CAAaF,cAAb,EAA6Bc,MAA7B,EAAqCC,MAArC,EAA6CF,GAA7C,CAAH,GAAuD,KAAK,CAAzE;;AAEA,QAAIZ,GAAG,KAAK,KAAR,IAAkBA,GAAG,KAAK,KAAK,CAAb,IAAkBa,MAAM,KAAKC,MAAnD,EAA4D;AAC1D,aAAO,KAAP;AACD;AACF;;AAED,SAAO,IAAP;AACD,CA3CD","sourcesContent":["//\n\nmodule.exports = function shallowEqual(objA, objB, compare, compareContext) {\n var ret = compare ? compare.call(compareContext, objA, objB) : void 0;\n\n if (ret !== void 0) {\n return !!ret;\n }\n\n if (objA === objB) {\n return true;\n }\n\n if (typeof objA !== \"object\" || !objA || typeof objB !== \"object\" || !objB) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);\n\n // Test for A's keys different from B.\n for (var idx = 0; idx < keysA.length; idx++) {\n var key = keysA[idx];\n\n if (!bHasOwnProperty(key)) {\n return false;\n }\n\n var valueA = objA[key];\n var valueB = objB[key];\n\n ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;\n\n if (ret === false || (ret === void 0 && valueA !== valueB)) {\n return false;\n }\n }\n\n return true;\n};\n"]},"metadata":{},"sourceType":"script"}