eq.d.ts 715 B

1234567891011121314151617181920212223242526272829303132
  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. * @since 4.0.0
  7. * @category Lang
  8. * @param {*} value The value to compare.
  9. * @param {*} other The other value to compare.
  10. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  11. * @example
  12. *
  13. * const object = { 'a': 1 }
  14. * const other = { 'a': 1 }
  15. *
  16. * eq(object, object)
  17. * // => true
  18. *
  19. * eq(object, other)
  20. * // => false
  21. *
  22. * eq('a', 'a')
  23. * // => true
  24. *
  25. * eq('a', Object('a'))
  26. * // => false
  27. *
  28. * eq(NaN, NaN)
  29. * // => true
  30. */
  31. declare function eq(value: any, other: any): boolean;
  32. export default eq;