diff options
Diffstat (limited to 'node_modules/lodash/_equalObjects.js')
-rw-r--r-- | node_modules/lodash/_equalObjects.js | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/node_modules/lodash/_equalObjects.js b/node_modules/lodash/_equalObjects.js index 092cb3ff9..7044ae9bb 100644 --- a/node_modules/lodash/_equalObjects.js +++ b/node_modules/lodash/_equalObjects.js @@ -1,7 +1,7 @@ var keys = require('./keys'); -/** Used to compose bitmasks for comparison styles. */ -var PARTIAL_COMPARE_FLAG = 2; +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -16,15 +16,14 @@ var hasOwnProperty = objectProto.hasOwnProperty; * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. - * @param {Function} equalFunc The function to determine equivalents of values. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` - * for more details. + * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ -function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { - var isPartial = bitmask & PARTIAL_COMPARE_FLAG, +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = keys(object), objLength = objProps.length, othProps = keys(other), @@ -62,7 +61,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { } // Recursively compare objects (susceptible to call stack limits). if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack)) + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) : compared )) { result = false; |