input function
predicate function
input function context
function wrapper
function foo( a, b ) {
return [ a, b ];
}
function predicate( v ) {
return ( v === 2 );
}
var bar = rejectArguments( foo, predicate );
var out = bar( 1, 2, 3 );
// returns [ 1, 3 ]
Returns a function that applies arguments to a provided function according to a predicate function.
Notes
The predicate function is provided the following arguments:
Only those arguments in which the predicate function returns a falsy value are applied to a provided function.