You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
647 B

4 years ago
  1. var arraySome = require('./_arraySome'),
  2. createOver = require('./_createOver');
  3. /**
  4. * Creates a function that checks if **any** of the `predicates` return
  5. * truthy when invoked with the arguments it receives.
  6. *
  7. * @static
  8. * @memberOf _
  9. * @since 4.0.0
  10. * @category Util
  11. * @param {...(Function|Function[])} [predicates=[_.identity]]
  12. * The predicates to check.
  13. * @returns {Function} Returns the new function.
  14. * @example
  15. *
  16. * var func = _.overSome([Boolean, isFinite]);
  17. *
  18. * func('1');
  19. * // => true
  20. *
  21. * func(null);
  22. * // => true
  23. *
  24. * func(NaN);
  25. * // => false
  26. */
  27. var overSome = createOver(arraySome);
  28. module.exports = overSome;