eq

Lang
since 4.0.0

Arguments

  • * The value to compare.
  • * The other value to compare.

Returns

boolean `true` if the values are equivalent, else `false`.

Performs a SameValueZero comparison between two values to determine if they are equivalent.

Example of Lodash _.eq

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