all

0.0.0 • Public • Published

all

callback when all callbacks have fired.

<img src=https://secure.travis-ci.org/dominictarr/all.png?branch=master>

var all = require('all')
var after = all(function () {
  console.log('done')
})
 
function doSomething(n, cb) {
  setTimeout(function () {
    console.log('N', n)
  }, Math.random() * 100)
}
 
doSomething(1, cb())
doSomething(2, cb())
doSomething(3, cb())
doSomething(4, cb())
 

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.0
    9,111
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.0
    9,111

Package Sidebar

Install

npm i all

Weekly Downloads

8,114

Version

0.0.0

License

MIT

Last publish

Collaborators

  • nopersonsmodules