diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-11-16 01:59:39 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-11-16 02:00:31 +0100 |
commit | bd65bb67e25a79b019d745b7262b2008ce2adb15 (patch) | |
tree | 89e1b032103a63737f1a703e6a943832ef261704 /node_modules/lodash/_baseIsEqualDeep.js | |
parent | f91466595b651721690133f58ab37f977539e95b (diff) |
incrementally verify denoms
The denominations are not stored in a separate object store.
Diffstat (limited to 'node_modules/lodash/_baseIsEqualDeep.js')
-rw-r--r-- | node_modules/lodash/_baseIsEqualDeep.js | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/node_modules/lodash/_baseIsEqualDeep.js b/node_modules/lodash/_baseIsEqualDeep.js index 42dc03d0f..b32f1f3ff 100644 --- a/node_modules/lodash/_baseIsEqualDeep.js +++ b/node_modules/lodash/_baseIsEqualDeep.js @@ -7,8 +7,8 @@ var Stack = require('./_Stack'), isBuffer = require('./isBuffer'), isTypedArray = require('./isTypedArray'); -/** Used to compose bitmasks for comparison styles. */ -var PARTIAL_COMPARE_FLAG = 2; +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', @@ -29,14 +29,13 @@ var hasOwnProperty = objectProto.hasOwnProperty; * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` - * for more details. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ -function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { var objIsArr = isArray(object), othIsArr = isArray(other), objTag = arrayTag, @@ -64,10 +63,10 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { if (isSameTag && !objIsObj) { stack || (stack = new Stack); return (objIsArr || isTypedArray(object)) - ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) - : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack); + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); } - if (!(bitmask & PARTIAL_COMPARE_FLAG)) { + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); @@ -76,14 +75,14 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack); - return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } if (!isSameTag) { return false; } stack || (stack = new Stack); - return equalObjects(object, other, equalFunc, customizer, bitmask, stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); } module.exports = baseIsEqualDeep; |