source: trip-planner-front/node_modules/lodash/_baseIsEqual.js@ 188ee53

Last change on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1019 bytes
Line 
1var baseIsEqualDeep = require('./_baseIsEqualDeep'),
2 isObjectLike = require('./isObjectLike');
3
4/**
5 * The base implementation of `_.isEqual` which supports partial comparisons
6 * and tracks traversed objects.
7 *
8 * @private
9 * @param {*} value The value to compare.
10 * @param {*} other The other value to compare.
11 * @param {boolean} bitmask The bitmask flags.
12 * 1 - Unordered comparison
13 * 2 - Partial comparison
14 * @param {Function} [customizer] The function to customize comparisons.
15 * @param {Object} [stack] Tracks traversed `value` and `other` objects.
16 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
17 */
18function baseIsEqual(value, other, bitmask, customizer, stack) {
19 if (value === other) {
20 return true;
21 }
22 if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
23 return value !== value && other !== other;
24 }
25 return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
26}
27
28module.exports = baseIsEqual;
Note: See TracBrowser for help on using the repository browser.