{"_id":"promise-reduce","_rev":"96747","name":"promise-reduce","description":"Reduce an array and return a Promise","dist-tags":{"latest":"2.1.0"},"maintainers":[{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"time":{"modified":"2021-06-03T10:32:25.000Z","created":"2015-01-24T04:02:32.930Z","2.1.0":"2016-07-07T15:25:15.451Z","2.0.0":"2015-07-21T13:13:12.355Z","1.1.0":"2015-07-11T01:44:08.198Z","1.0.1":"2015-01-24T04:02:32.930Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/yoshuawuyts/promise-reduce.git"},"versions":{"2.1.0":{"name":"promise-reduce","version":"2.1.0","description":"Reduce an array and return a Promise","main":"index.js","scripts":{"lint":"eslint .","test":"NODE_ENV=test tape test.js","test-cov":"NODE_ENV=test istanbul cover test.js"},"repository":{"type":"git","url":"git+https://github.com/yoshuawuyts/promise-reduce.git"},"keywords":["bluebird","native","promise","reduce"],"license":"MIT","dependencies":{"any-promise":"^0.1.0"},"devDependencies":{"bluebird":"^2.8.2","eslint":"^0.12.0","istanbul":"^0.3.5","tap-bail":"0.0.0","tap-spec":"^2.2.0","tape":"^3.4.0"},"files":["LICENSE","README.md","index.js"],"gitHead":"42c5c195839e0c6816b9a06dddbee60dee259f33","bugs":{"url":"https://github.com/yoshuawuyts/promise-reduce/issues"},"homepage":"https://github.com/yoshuawuyts/promise-reduce#readme","_id":"promise-reduce@2.1.0","_shasum":"77198731b5c62cbd5f8e1845511131d00e3b6c47","_from":".","_npmVersion":"2.15.1","_nodeVersion":"5.9.1","_npmUser":{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"},"dist":{"shasum":"77198731b5c62cbd5f8e1845511131d00e3b6c47","size":2262,"noattachment":false,"key":"/promise-reduce/-/promise-reduce-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/promise-reduce/download/promise-reduce-2.1.0.tgz"},"maintainers":[{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/promise-reduce-2.1.0.tgz_1467905112879_0.6429138274397701"},"directories":{},"publish_time":1467905115451,"_cnpm_publish_time":1467905115451,"_hasShrinkwrap":false},"2.0.0":{"name":"promise-reduce","version":"2.0.0","description":"Reduce an array and return a Promise","main":"index.js","scripts":{"lint":"eslint .","test":"NODE_ENV=test tape test.js","test-cov":"NODE_ENV=test istanbul cover test.js"},"repository":{"type":"git","url":"git+https://github.com/yoshuawuyts/promise-reduce.git"},"keywords":["bluebird","native","promise","reduce"],"license":"MIT","dependencies":{"any-promise":"^0.1.0"},"devDependencies":{"bluebird":"^2.8.2","eslint":"^0.12.0","istanbul":"^0.3.5","tap-bail":"0.0.0","tap-spec":"^2.2.0","tape":"^3.4.0"},"files":["LICENSE","README.md","index.js"],"gitHead":"d2b4cf2c085e6e9adee25ec1983ab0b3fc2e3b9a","bugs":{"url":"https://github.com/yoshuawuyts/promise-reduce/issues"},"homepage":"https://github.com/yoshuawuyts/promise-reduce#readme","_id":"promise-reduce@2.0.0","_shasum":"2e4fd1169d1108a7bab4f5d3227480c101f80fc5","_from":".","_npmVersion":"3.1.0","_nodeVersion":"2.3.0","_npmUser":{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"},"dist":{"shasum":"2e4fd1169d1108a7bab4f5d3227480c101f80fc5","size":2180,"noattachment":false,"key":"/promise-reduce/-/promise-reduce-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/promise-reduce/download/promise-reduce-2.0.0.tgz"},"maintainers":[{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"directories":{},"publish_time":1437484392355,"_cnpm_publish_time":1437484392355,"_hasShrinkwrap":false},"1.1.0":{"name":"promise-reduce","version":"1.1.0","description":"Reduce an array and return a Promise","main":"index.js","scripts":{"lint":"eslint .","test":"NODE_ENV=test tape test.js","test-cov":"NODE_ENV=test istanbul cover test.js"},"repository":{"type":"git","url":"git+https://github.com/yoshuawuyts/promise-reduce.git"},"keywords":["bluebird","native","promise","reduce"],"license":"MIT","dependencies":{"any-promise":"^0.1.0"},"devDependencies":{"bluebird":"^2.8.2","eslint":"^0.12.0","istanbul":"^0.3.5","tap-bail":"0.0.0","tap-spec":"^2.2.0","tape":"^3.4.0"},"files":["LICENSE","README.md","index.js"],"gitHead":"51293d4cbcc754c1724809be3704c6a02500ca40","bugs":{"url":"https://github.com/yoshuawuyts/promise-reduce/issues"},"homepage":"https://github.com/yoshuawuyts/promise-reduce#readme","_id":"promise-reduce@1.1.0","_shasum":"20d110e9275621ab7b089c2b0eaf272479b71596","_from":".","_npmVersion":"3.1.0","_nodeVersion":"2.3.0","_npmUser":{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"},"dist":{"shasum":"20d110e9275621ab7b089c2b0eaf272479b71596","size":2138,"noattachment":false,"key":"/promise-reduce/-/promise-reduce-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/promise-reduce/download/promise-reduce-1.1.0.tgz"},"maintainers":[{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"directories":{},"publish_time":1436579048198,"_cnpm_publish_time":1436579048198,"_hasShrinkwrap":false},"1.0.1":{"name":"promise-reduce","version":"1.0.1","description":"Reduce an array and return a Promise","main":"index.js","scripts":{"test":"NODE_ENV=test tape test.js","test-cov":"NODE_ENV=test istanbul cover test.js","lint":"eslint ."},"repository":{"type":"git","url":"https://github.com/yoshuawuyts/promise-reduce"},"keywords":["promise","native","bluebird","reduce"],"license":"MIT","dependencies":{"native-or-bluebird":"^1.1.2"},"devDependencies":{"bluebird":"^2.8.2","eslint":"^0.12.0","istanbul":"^0.3.5","tap-bail":"0.0.0","tap-spec":"^2.2.0","tape":"^3.4.0"},"files":["LICENSE","index.js","README.md"],"gitHead":"6901c0bc05eb6653ac2eef33195d20c198916ca5","bugs":{"url":"https://github.com/yoshuawuyts/promise-reduce/issues"},"homepage":"https://github.com/yoshuawuyts/promise-reduce","_id":"promise-reduce@1.0.1","_shasum":"b4ca13a6c374cc733f70ae3366722a1bbfa74cf9","_from":".","_npmVersion":"2.3.0","_nodeVersion":"0.10.33","_npmUser":{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"},"maintainers":[{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"dist":{"shasum":"b4ca13a6c374cc733f70ae3366722a1bbfa74cf9","size":2145,"noattachment":false,"key":"/promise-reduce/-/promise-reduce-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/promise-reduce/download/promise-reduce-1.0.1.tgz"},"directories":{},"publish_time":1422072152930,"_cnpm_publish_time":1422072152930,"_hasShrinkwrap":false}},"readme":"# promise-reduce\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[Reduce][mdn] an array and return a [Promise][promise].\n\n## Installation\n```bash\n$ npm install promise-reduce\n```\n\n## Usage\n```js\nconst reduce = require('promise-reduce')\n\nPromise.resolve([1, 2, 3])\n  .then(reduce((prev, next) => prev + next), 0))\n// => 6\n```\n\n## Why?\nThis module is basically equivalent to [`bluebird.reduce`][bluebird], but it's handy\nto have the one function you need instead of a kitchen sink. Modularity!\nEspecially handy if you're serving to the browser and need to reduce your\njavascript bundle size.\n\nWorks great in the browser with\n[browserify](http://github.com/substack/node-browserify)!\n\n## See Also\n- [promise-each](https://github.com/yoshuawuyts/promise-each)\n- [promise-every](https://github.com/yoshuawuyts/promise-every)\n- [promise-filter](https://github.com/yoshuawuyts/promise-filter)\n- [promise-map](https://github.com/yoshuawuyts/promise-map)\n- [promise-some](https://github.com/yoshuawuyts/promise-some)\n\n## License\n[MIT](https://tldrlegal.com/license/mit-license)\n\n[npm-image]: https://img.shields.io/npm/v/promise-reduce.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/promise-reduce\n[travis-image]: https://img.shields.io/travis/yoshuawuyts/promise-reduce.svg?style=flat-square\n[travis-url]: https://travis-ci.org/yoshuawuyts/promise-reduce\n[coveralls-image]: https://img.shields.io/coveralls/yoshuawuyts/promise-reduce.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/yoshuawuyts/promise-reduce?branch=master\n[downloads-image]: http://img.shields.io/npm/dm/promise-reduce.svg?style=flat-square\n[downloads-url]: https://npmjs.org/package/promise-reduce\n\n[mdn]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce\n[promise]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise\n[bluebird]: https://github.com/petkaantonov/bluebird/blob/master/API.md#reducefunction-reducer--dynamic-initialvalue---promise\n","_attachments":{},"homepage":"https://github.com/yoshuawuyts/promise-reduce#readme","bugs":{"url":"https://github.com/yoshuawuyts/promise-reduce/issues"},"license":"MIT"}