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

sequence

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sequence

The sequence module of FuturesJS (Ender.JS and Node.JS)

  • 2.2.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

sequence()

Creates an Asynchronous Stack which execute each enqueued method after the previous function calls the provided next(err, data [, ...]).

Core

  • Futures.sequence(globalContext=null)
  • then(next, err, data [, ...]) - add a method onto the queue
    • begins or resumes the queue
    • passes the results of the previous function into the next

Example:

var sequence = Futures.sequence(),
  err;

sequence
  .then(function (next) {
    setTimeout(function () {
      next(err, "Hi", "World!");
    }, 120);
  })
  .then(function (next, err, a, b) {
    setTimeout(function () {
      next(err, "Hello", b);
    }, 270);
  })
  .then(function (next, err, a, b) {
    setTimeout(function () {
      console.log(a, b);
      next();
    }, 50);
  });

Keywords

FAQs

Package last updated on 31 May 2012

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