1 | import baseIsEqual from './_baseIsEqual';
|
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 **not** supported.
|
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,
|
20 | * else `false`.
|
21 | * @example
|
22 | *
|
23 | * var object = { 'user': 'fred' };
|
24 | * var other = { 'user': 'fred' };
|
25 | *
|
26 | * _.isEqual(object, other);
|
27 | * // => true
|
28 | *
|
29 | * object === other;
|
30 | * // => false
|
31 | */
|
32 | function isEqual(value, other) {
|
33 | return baseIsEqual(value, other);
|
34 | }
|
35 |
|
36 | export default isEqual;
|