_.eq(value, other)
Performs a SameValueZero
comparison between two values to determine if they are equivalent.
Since
4.0.0
Arguments
-
value
(*): The value to compare. -
other
(*): The other value to compare.
Returns
(boolean): Returns true
if the values are equivalent, else false
.
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | var object = { 'a' : 1 }; var other = { 'a' : 1 }; _.eq(object, object); // => true _.eq(object, other); // => false _.eq( 'a' , 'a' ); // => true _.eq( 'a' , Object( 'a' )); // => false _.eq(NaN, NaN); // => true |
Please login to continue.