You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

promise-reduce

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

promise-reduce

Reduce an array and return a Promise


Version published
Weekly downloads
6.2K
decreased by-3.76%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

promise-reduce

NPM version build status Test coverage Downloads

Reduce an array and return a Promise.

Installation

$ npm install promise-reduce

Usage

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, 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!

See Also

License

MIT

Keywords

FAQs

Package last updated on 07 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc