overArgs
Function
since 4.0.0
Arguments
- Function The function to wrap.
- ...(Function|Function[]) The argument transforms.
Returns
Function the new function.
Creates a function that invokes func
with its arguments transformed.
Example of Lodash _.overArgs
function doubled(n) {
return n * 2;
}
function square(n) {
return n * n;
}
var func = _.overArgs(function(x, y) {
return [x, y];
}, [square, doubled]);
func(9, 3);
// => [81, 6]
func(10, 5);
// => [100, 10]