Performs a SameValueZero comparison between two values to determine if they are equivalent.
SameValueZero
The value to compare.
The other value to compare.
Returns true if the values are equivalent, else false.
true
false
var object = { 'user': 'fred' };var other = { 'user': 'fred' };_.eq(object, object);// => true_.eq(object, other);// => false_.eq('a', 'a');// => true_.eq('a', Object('a'));// => false_.eq(NaN, NaN);// => true Copy
var object = { 'user': 'fred' };var other = { 'user': 'fred' };_.eq(object, object);// => true_.eq(object, other);// => false_.eq('a', 'a');// => true_.eq('a', Object('a'));// => false_.eq(NaN, NaN);// => true
Performs a
SameValueZero
comparison between two values to determine if they are equivalent.