# promise-reduce

> Reduce an array and return a Promise

Latest version **2.1.0** (published 2016-07-07) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2016-07-07 |
| First published | 2015-01-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Maintainers | yoshuawuyts |
| Keywords | bluebird, native, promise, reduce |

## Links

- npm: https://www.npmjs.com/package/promise-reduce
- Repository: https://github.com/yoshuawuyts/promise-reduce
- Homepage: https://github.com/yoshuawuyts/promise-reduce#readme
- Issues: https://github.com/yoshuawuyts/promise-reduce/issues
- npm.io page: https://npm.io/package/promise-reduce

## Dependencies (1)

- [any-promise](https://npm.io/package/any-promise.md) ^0.1.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

- 2.1.0 (latest) — 2016-07-07
- 2.0.0 — 2015-07-21
- 1.1.0 — 2015-07-11
- 1.0.1 — 2015-01-24

## README

# promise-reduce
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Downloads][downloads-image]][downloads-url]

[Reduce][mdn] an array and return a [Promise][promise].

## Installation
```bash
$ npm install promise-reduce
```

## Usage
```js
const reduce = require('promise-reduce')

Promise.resolve([1, 2, 3])
  .then(reduce((prev, next) => prev + next), 0))
// => 6
```

## Why?
This module is basically equivalent to [`bluebird.reduce`][bluebird], but it's handy
to have the one function you need instead of a kitchen sink. Modularity!
Especially handy if you're serving to the browser and need to reduce your
javascript bundle size.

Works great in the browser with
[browserify](http://github.com/substack/node-browserify)!

## See Also
- [promise-each](https://github.com/yoshuawuyts/promise-each)
- [promise-every](https://github.com/yoshuawuyts/promise-every)
- [promise-filter](https://github.com/yoshuawuyts/promise-filter)
- [promise-map](https://github.com/yoshuawuyts/promise-map)
- [promise-some](https://github.com/yoshuawuyts/promise-some)

## License
[MIT](https://tldrlegal.com/license/mit-license)

[npm-image]: https://img.shields.io/npm/v/promise-reduce.svg?style=flat-square
[npm-url]: https://npmjs.org/package/promise-reduce
[travis-image]: https://img.shields.io/travis/yoshuawuyts/promise-reduce.svg?style=flat-square
[travis-url]: https://travis-ci.org/yoshuawuyts/promise-reduce
[coveralls-image]: https://img.shields.io/coveralls/yoshuawuyts/promise-reduce.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/yoshuawuyts/promise-reduce?branch=master
[downloads-image]: http://img.shields.io/npm/dm/promise-reduce.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/promise-reduce

[mdn]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce
[promise]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
[bluebird]: https://github.com/petkaantonov/bluebird/blob/master/API.md#reducefunction-reducer--dynamic-initialvalue---promise

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