# just-curry-it

> return a curried function

Latest version **5.3.0** (published 2022-12-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install just-curry-it
pnpm add just-curry-it
yarn add just-curry-it
bun add just-curry-it
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.3.0 |
| Published | 2022-12-17 |
| First published | 2016-07-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6199 |
| Author | Angus Croll |
| Maintainers | angus-c |
| Keywords | function, curry, no-dependencies, just |

## Links

- npm: https://www.npmjs.com/package/just-curry-it
- Repository: https://github.com/angus-c/just
- Homepage: https://github.com/angus-c/just#readme
- Issues: https://github.com/angus-c/just/issues
- npm.io page: https://npm.io/package/just-curry-it

## Recent versions

- 5.3.0 (latest) — 2022-12-17
- 5.2.1 — 2022-08-08
- 5.2.0 — 2022-08-07
- 5.1.0 — 2022-04-16
- 5.0.1 — 2021-11-13
- 5.0.0 — 2021-11-09
- 4.1.1 — 2021-11-01
- 4.1.0 — 2021-10-31
- 4.0.0 — 2021-10-22
- 3.2.1 — 2021-05-03
- 3.2.0 — 2021-05-03
- 3.1.0 — 2018-08-09
- 3.0.0 — 2017-11-05
- 2.0.1 — 2017-04-08
- 2.0.0 — 2017-04-08
- … 6 more at https://npm.io/package/just-curry-it/versions

## README

<!-- DO NOT EDIT THIS FILE! THIS FILE WAS AUTOGENERATED BY TEMPLATE-MATE -->
<!-- SEE https://github.com/angus-c/just/blob/master/CONTRIBUTING.md#readme-template -->

## just-curry-it

Part of a [library](https://anguscroll.com/just) of zero-dependency npm modules that do just do one thing.
Guilt-free utilities for every occasion.

[`🍦 Try it`](https://anguscroll.com/just/just-curry-it)

```shell
npm install just-curry-it
```
```shell
yarn add just-curry-it
```

Return a curried function

```js
import curry from 'just-curry-it';

function add(a, b, c) {
  return a + b + c;
}
curry(add)(1)(2)(3); // 6
curry(add)(1)(2)(2); // 5
curry(add)(2)(4, 3); // 9

function add(...args) {
  return args.reduce((sum, n) => sum + n, 0)
}
var curryAdd4 = curry(add, 4)
curryAdd4(1)(2, 3)(4); // 10

function converter(ratio, input) {
  return (input*ratio).toFixed(1);
}
const curriedConverter = curry(converter)
const milesToKm = curriedConverter(1.62);
milesToKm(35); // 56.7
milesToKm(10); // 16.2
```

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