Nukem's Possible Manifestation

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

18

version

1.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability