Skip to content
This repository was archived by the owner on Dec 12, 2023. It is now read-only.
/ partial Public archive

A functional utility for doing partial application in JavaScript

License

Notifications You must be signed in to change notification settings

blakeembrey/partial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Partial

NPM version Build status Test coverage Greenkeeper badge

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

About

A functional utility for doing partial application in JavaScript

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published