# apr-reduce

> Reduces coll into a single value using an async iteratee to return each successive step.

Latest version **3.0.3** (published 2018-01-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install apr-reduce
pnpm add apr-reduce
yarn add apr-reduce
bun add apr-reduce
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.3 |
| Published | 2018-01-28 |
| First published | 2017-02-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 75 |
| Author | Sérgio Ramos |
| Maintainers | ramitos |
| Keywords | reduce, async, await, promise, control, flow, control-flow, awaitful, promises, async-await, es2015, es2016, es2017, es6, es7, es8 |

## Links

- npm: https://www.npmjs.com/package/apr-reduce
- Repository: https://github.com/ramitos/apr
- Homepage: https://apr.js.org/#reduce
- Issues: https://github.com/ramitos/apr/issues
- npm.io page: https://npm.io/package/apr-reduce

## Dependencies (2)

- [apr-engine-each](https://npm.io/package/apr-engine-each.md) ^3.0.3
- [lodash.defaults](https://npm.io/package/lodash.defaults.md) ^4.2.0

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 3.0.3 (latest) — 2018-01-28
- 3.0.2 — 2018-01-23
- 3.0.1 — 2018-01-23
- 3.0.0 — 2018-01-23
- 1.0.5 — 2017-05-12
- 1.0.4 — 2017-05-11
- 1.0.3 — 2017-02-26
- 1.0.2 — 2017-02-25
- 1.0.1 — 2017-02-09
- 1.0.0 — 2017-02-08

## README

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## reduce

<a id="reduce"></a>
Reduces `coll` into a single value using an async `iteratee` to return each successive step.

[![](https://img.shields.io/npm/v/apr-reduce.svg?style=flat-square)](https://www.npmjs.com/package/apr-reduce) [![](https://img.shields.io/npm/l/apr-reduce.svg?style=flat-square)](https://www.npmjs.com/package/apr-reduce)

**Parameters**

-   `input` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array) \| [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) | Iterable)** 
-   `iteratee` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** 

**Examples**

```javascript
import reduce from 'apr-reduce';

const sum = await reduce([1, 2, 3], async (sum, item) =>
  new Promise((resolve) => resolve(sum + item))
);
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)**

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