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

async-series

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-series

Run a series of callbacks in sequence.

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.1K
decreased by-42.82%
Maintainers
1
Weekly downloads
 
Created
Source

async-series

Run a series of callbacks in sequence, as simply as possible.

More or less equivalent to async.series - solely for the sake of keeping some modules tiny for browserify.

Installation

npm install async-series

Usage

series(tasks, callback, safe)

Where tasks is an array of functions, each with their own done argument. callback is called when finished. Setting safe to true will ensure there's at least a tick between each task to prevent RangeErrors.

series([
  function(done) {
    console.log('first thing')
    done()
  },
  function(done) {
    console.log('second thing')
    done(new Error('another thing'))
  },
  function(done) {
    // never happens, because "second thing"
    // passed an error to the done() callback
  }
], function(err) {
  console.log(err.message) // "another thing"
})

Keywords

FAQs

Package last updated on 20 Mar 2013

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