73262098c595fe81b72265c0a3df3bb5.json
8.91 KB
{"ast":null,"code":"var getAllKeys = require('./_getAllKeys');\n/** Used to compose bitmasks for value comparisons. */\n\n\nvar COMPARE_PARTIAL_FLAG = 1;\n/** Used for built-in method references. */\n\nvar objectProto = Object.prototype;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n\n var index = objLength;\n\n while (index--) {\n var key = objProps[index];\n\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n } // Check that cyclic values are equal.\n\n\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n var skipCtor = isPartial;\n\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);\n } // Recursively compare objects (susceptible to call stack limits).\n\n\n if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {\n result = false;\n break;\n }\n\n skipCtor || (skipCtor = key == 'constructor');\n }\n\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal.\n\n if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/lodash/_equalObjects.js"],"names":["getAllKeys","require","COMPARE_PARTIAL_FLAG","objectProto","Object","prototype","hasOwnProperty","equalObjects","object","other","bitmask","customizer","equalFunc","stack","isPartial","objProps","objLength","length","othProps","othLength","index","key","call","objStacked","get","othStacked","result","set","skipCtor","objValue","othValue","compared","undefined","objCtor","constructor","othCtor","module","exports"],"mappings":"AAAA,IAAIA,UAAU,GAAGC,OAAO,CAAC,eAAD,CAAxB;AAEA;;;AACA,IAAIC,oBAAoB,GAAG,CAA3B;AAEA;;AACA,IAAIC,WAAW,GAAGC,MAAM,CAACC,SAAzB;AAEA;;AACA,IAAIC,cAAc,GAAGH,WAAW,CAACG,cAAjC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,YAAT,CAAsBC,MAAtB,EAA8BC,KAA9B,EAAqCC,OAArC,EAA8CC,UAA9C,EAA0DC,SAA1D,EAAqEC,KAArE,EAA4E;AAC1E,MAAIC,SAAS,GAAGJ,OAAO,GAAGR,oBAA1B;AAAA,MACIa,QAAQ,GAAGf,UAAU,CAACQ,MAAD,CADzB;AAAA,MAEIQ,SAAS,GAAGD,QAAQ,CAACE,MAFzB;AAAA,MAGIC,QAAQ,GAAGlB,UAAU,CAACS,KAAD,CAHzB;AAAA,MAIIU,SAAS,GAAGD,QAAQ,CAACD,MAJzB;;AAMA,MAAID,SAAS,IAAIG,SAAb,IAA0B,CAACL,SAA/B,EAA0C;AACxC,WAAO,KAAP;AACD;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B;;;AACA,QAAI,EAAEkB,QAAQ,KAAKC,SAAb,GACGH,QAAQ,KAAKC,QAAb,IAAyBlB,SAAS,CAACiB,QAAD,EAAWC,QAAX,EAAqBpB,OAArB,EAA8BC,UAA9B,EAA0CE,KAA1C,CADrC,GAEEkB,QAFJ,CAAJ,EAGO;AACLL,MAAAA,MAAM,GAAG,KAAT;AACA;AACD;;AACDE,IAAAA,QAAQ,KAAKA,QAAQ,GAAGP,GAAG,IAAI,aAAvB,CAAR;AACD;;AACD,MAAIK,MAAM,IAAI,CAACE,QAAf,EAAyB;AACvB,QAAIK,OAAO,GAAGzB,MAAM,CAAC0B,WAArB;AAAA,QACIC,OAAO,GAAG1B,KAAK,CAACyB,WADpB,CADuB,CAIvB;;AACA,QAAID,OAAO,IAAIE,OAAX,IACC,iBAAiB3B,MAAjB,IAA2B,iBAAiBC,KAD7C,IAEA,EAAE,OAAOwB,OAAP,IAAkB,UAAlB,IAAgCA,OAAO,YAAYA,OAAnD,IACA,OAAOE,OAAP,IAAkB,UADlB,IACgCA,OAAO,YAAYA,OADrD,CAFJ,EAGmE;AACjET,MAAAA,MAAM,GAAG,KAAT;AACD;AACF;;AACDb,EAAAA,KAAK,CAAC,QAAD,CAAL,CAAgBL,MAAhB;AACAK,EAAAA,KAAK,CAAC,QAAD,CAAL,CAAgBJ,KAAhB;AACA,SAAOiB,MAAP;AACD;;AAEDU,MAAM,CAACC,OAAP,GAAiB9B,YAAjB","sourcesContent":["var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n"]},"metadata":{},"sourceType":"script"}