Miss any of our Open RFC calls?Watch the recordings here! »

util-partial

1.0.1 • Public • Published

Partial

NPM version Build status Test coverage Gittip

Partially apply a function by pre-filling some of its arguments and without changing the this context.

Installation

npm install util-partial --save

Usage

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

Typings

Includes a TypeScript type definition.

License

MIT

Install

npm i util-partial

DownloadsWeekly Downloads

3

Version

1.0.1

License

MIT

Last publish

Collaborators

  • avatar