You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gaoshuguang da6e1e10a6 首次提交 2 years ago
..
.npmignore 首次提交 2 years ago
.travis.yml 首次提交 2 years ago
LICENSE 首次提交 2 years ago
README.md 首次提交 2 years ago
example.js 首次提交 2 years ago
index.js 首次提交 2 years ago
package.json 首次提交 2 years ago

README.md

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