1.0.1 • Published 8 years ago

util-partial v1.0.1

Weekly downloads
6
License
MIT
Repository
github
Last release
8 years ago

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

1.0.1

8 years ago

1.0.0

10 years ago