is-equal-with.d.ts 721 B

123456789101112131415161718192021222324
  1. declare const _default: <T>(value: T, other: T, fn: (v1: T, v2: T) => boolean) => boolean;
  2. /**
  3. * @param {*} value The value to compare.
  4. * @param {*} other The other value to compare.
  5. * @param {Function} [fn] The function to customize comparisons.
  6. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  7. * @example
  8. *
  9. * function isGreeting(value) {
  10. * return /^h(?:i|ello)$/.test(value);
  11. * }
  12. *
  13. * function customizer(objValue, othValue) {
  14. * if (isGreeting(objValue) && isGreeting(othValue)) {
  15. * return true;
  16. * }
  17. * }
  18. *
  19. * var array = ['hello', 'goodbye'];
  20. * var other = ['hi', 'goodbye'];
  21. *
  22. * isEqualWith(array, other, customizer); // => true
  23. */
  24. export default _default;