Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

12345678910111213141516171819202122232425262728293031323334353637
  1. /**
  2. * Performs a
  3. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  4. * comparison between two values to determine if they are equivalent.
  5. *
  6. * @static
  7. * @memberOf _
  8. * @since 4.0.0
  9. * @category Lang
  10. * @param {*} value The value to compare.
  11. * @param {*} other The other value to compare.
  12. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  13. * @example
  14. *
  15. * var object = { 'a': 1 };
  16. * var other = { 'a': 1 };
  17. *
  18. * _.eq(object, object);
  19. * // => true
  20. *
  21. * _.eq(object, other);
  22. * // => false
  23. *
  24. * _.eq('a', 'a');
  25. * // => true
  26. *
  27. * _.eq('a', Object('a'));
  28. * // => false
  29. *
  30. * _.eq(NaN, NaN);
  31. * // => true
  32. */
  33. function eq(value, other) {
  34. return value === other || (value !== value && other !== other);
  35. }
  36. module.exports = eq;