New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

async-step

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-step

A basic ES6 async/await chain function

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

async-step

A basic ES6 async/await chain function

This basic function allows chaining multiple promises/async functions. Two possible styles are supported. Note: Each callback will be called with the next input parameter, and the last result.

  • Single callback - Use this if every item has the same callback
const results = await asyncStep([0, 1, 2], cb);
// results will contain the output of each cb() execution
console.log(results);
  • Many callbacks - Use this if you need configurable callbacks per function
const results2 = await forEach([
 () => cb(0),
 last => cb(1, last),
 last => cb(2, last),
]);

Keywords

async

FAQs

Package last updated on 17 Jul 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