util-partial

A functional utility for doing partial application.

Partial

Partially apply a function by pre-filling a number of its arguments and without changing its this value.

npm install util-partial --save
var partial = require('util-partial');
 
var add = function (ab) {
  return a + b;
};
 
var add5 = partial(add, 5);
 
add5(10); //=> 15 
add5(20); //=> 25 
add5(30); //=> 35 

MIT