The Wayback Machine - https://web.archive.org/web/20201220221836/https://github.com/lodash/lodash/blob/master/over.js
Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
25 lines (23 sloc) 553 Bytes
import map from './map.js'
/**
* Creates a function that invokes `iteratees` with the arguments it receives
* and returns their results.
*
* @since 4.0.0
* @category Util
* @param {Function[]} [iteratees=[identity]]
* The iteratees to invoke.
* @returns {Function} Returns the new function.
* @example
*
* const func = over([Math.max, Math.min])
*
* func(1, 2, 3, 4)
* // => [4, 1]
*/
function over(iteratees) {
return function(...args) {
return map(iteratees, (iteratee) => iteratee.apply(this, args))
}
}
export default over
You can’t perform that action at this time.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.