Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sky-promise-foreach

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sky-promise-foreach

execute a promise array without sequence and status

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

promise-foreach

Introduce

  • Promise.all: one failed, all failed
  • Promise.race: one success, all success
  • Promise.each: handle one by one

Well, if I want to run the promises at the same time... and, statistics the percent of success?

Promise foreach can! It will never throw a reject, you can handle the result with one success handler and one error handler.

Install

npm install sky-promise-foreach

Usage

const foreach = require('sky-promise-foreach')

foreach([...promises], (result) => {
  // success handler for each promise
}, (err) => {
  // error handler for each promise
})

Todo

  • Test
  • CI

FAQs

Package last updated on 03 Sep 2018

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc