# partial

> partial function application - transform f into its partial by partial(f)

Latest version **0.0.7** (published 2018-12-23) · 0 weekly downloads

## Install

```sh
npm install partial
pnpm add partial
yarn add partial
bun add partial
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2018-12-23 |
| First published | 2011-07-21 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | David Wee |
| Maintainers | rook2pawn |

## Links

- npm: https://www.npmjs.com/package/partial
- Repository: https://github.com/rook2pawn/node-partial
- Issues: https://github.com/rook2pawn/node-partial/issues
- npm.io page: https://npm.io/package/partial

## Recent versions

- 0.0.7 (latest) — 2018-12-23
- 0.0.6 — 2018-07-17
- 0.0.5 — 2017-01-11
- 0.0.4 — 2016-04-22
- 0.0.3 — 2011-07-25
- 0.0.2 — 2011-07-24
- 0.0.1 — 2011-07-21

## README

[![Build Status](https://travis-ci.org/rook2pawn/node-partial.svg?branch=master)](https://travis-ci.org/rook2pawn/node-partial)

[![Coverage Status](https://coveralls.io/repos/github/rook2pawn/node-partial/badge.svg?branch=master)](https://coveralls.io/github/rook2pawn/node-partial?branch=master)

partial
=======

is simple to use

	var partial = require('partial');
	var foo = function(x,y,z) { return (x*y) + z }

	var bar = partial(foo);

and we're done! Now we can simply say

	bar(2,3)(4); // 10
	bar(2)(3,4); // 10

	var fix = bar(2,3);
	fix(4); // 10


usage
-----
Simply pass any function to partial, and if you wish, any arguments you want to fix.

	var bar = partial(foo);
	var baz = bar(2,3);

is identical to

	var baz2 = partial(foo,2,3);


both can be used like so:

	baz(4); // 10
	baz2(4); // 10

Right side partial function application is through .rapply i.e.

	var bar = partial.rapply(foo);
	var baz = bar(3,7); // y = 3, z = 7

	baz(2); // (2*3) + 7 = 13

---
_Source: https://npm.io/package/partial · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
