diff options
Diffstat (limited to 'node_modules/lodash/_equalByTag.js')
-rw-r--r-- | node_modules/lodash/_equalByTag.js | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/node_modules/lodash/_equalByTag.js b/node_modules/lodash/_equalByTag.js index 07d8c8c00..71919e867 100644 --- a/node_modules/lodash/_equalByTag.js +++ b/node_modules/lodash/_equalByTag.js @@ -5,9 +5,9 @@ var Symbol = require('./_Symbol'), mapToArray = require('./_mapToArray'), setToArray = require('./_setToArray'); -/** Used to compose bitmasks for comparison styles. */ -var UNORDERED_COMPARE_FLAG = 1, - PARTIAL_COMPARE_FLAG = 2; +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; /** `Object#toString` result references. */ var boolTag = '[object Boolean]', @@ -38,14 +38,13 @@ var symbolProto = Symbol ? Symbol.prototype : undefined, * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {string} tag The `toStringTag` of the objects 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 equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag: if ((object.byteLength != other.byteLength) || @@ -83,7 +82,7 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { var convert = mapToArray; case setTag: - var isPartial = bitmask & PARTIAL_COMPARE_FLAG; + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; convert || (convert = setToArray); if (object.size != other.size && !isPartial) { @@ -94,11 +93,11 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { if (stacked) { return stacked == other; } - bitmask |= UNORDERED_COMPARE_FLAG; + bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits). stack.set(object, other); - var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); stack['delete'](object); return result; |