over.js 558 B

12345678910111213141516171819202122232425
  1. var arrayMap = require('./_arrayMap'),
  2. createOver = require('./_createOver');
  3. /**
  4. * Creates a function that invokes `iteratees` with the arguments it receives
  5. * and returns their results.
  6. *
  7. * @static
  8. * @memberOf _
  9. * @since 4.0.0
  10. * @category Util
  11. * @param {...(Function|Function[])} [iteratees=[_.identity]]
  12. * The iteratees to invoke.
  13. * @returns {Function} Returns the new function.
  14. * @example
  15. *
  16. * var func = _.over([Math.max, Math.min]);
  17. *
  18. * func(1, 2, 3, 4);
  19. * // => [4, 1]
  20. */
  21. var over = createOver(arrayMap);
  22. module.exports = over;