🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

serially

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serially

Compose async functions into one function that runs all serially

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
22
144.44%
Maintainers
1
Weekly downloads
 
Created
Source

serially

Compose async functions into one function that runs all serially

Install

$ npm install serially

Usage

var serially = require('serially')
var http = require('http')
var fs = require('fs')

var all = serially()
      .add(foo, ['a', 'b', 'c'])
      .add(bar, [1, 2, 3])
      .add('qux alias', qux, [4, 5, 6])

all(function (error, results) {
  if (error) throw error

   console.log('done')
   console.log(results)
   // => { foo: [...], bar: [...], qux alias: [...] }
})

function foo (pa, ra, ms, callback) {}
function bar (pa, ra, ms, callback) {}
function qux (pa, ra, ms, callback) {}

See test.js for more info.

Keywords

serial

FAQs

Package last updated on 22 Jul 2014

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