1 | import baseIsEqual from './_baseIsEqual.js';
|
2 |
|
3 | /**
|
4 | * Performs a deep comparison between two values to determine if they are
|
5 | * equivalent.
|
6 | *
|
7 | * **Note:** This method supports comparing arrays, array buffers, booleans,
|
8 | * date objects, error objects, maps, numbers, `Object` objects, regexes,
|
9 | * sets, strings, symbols, and typed arrays. `Object` objects are compared
|
10 | * by their own, not inherited, enumerable properties. Functions and DOM
|
11 | * nodes are compared by strict equality, i.e. `===`.
|
12 | *
|
13 | * @static
|
14 | * @memberOf _
|
15 | * @since 0.1.0
|
16 | * @category Lang
|
17 | * @param {*} value The value to compare.
|
18 | * @param {*} other The other value to compare.
|
19 | * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
20 | * @example
|
21 | *
|
22 | * var object = { 'a': 1 };
|
23 | * var other = { 'a': 1 };
|
24 | *
|
25 | * _.isEqual(object, other);
|
26 | * // => true
|
27 | *
|
28 | * object === other;
|
29 | * // => false
|
30 | */
|
31 | function isEqual(value, other) {
|
32 | return baseIsEqual(value, other);
|
33 | }
|
34 |
|
35 | export default isEqual;
|