This package has been deprecated

Author message:

No longer maintained

util-partial
TypeScript icon, indicating that this package has built-in type declarations

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

Dependents (0)

Package Sidebar

Install

npm i util-partial

Weekly Downloads

4

Version

1.0.1

License

MIT

Last publish

Collaborators

  • blakeembrey