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.
|
|
9 months ago | |
|---|---|---|
| .. | ||
| .npmignore | 9 months ago | |
| .travis.yml | 9 months ago | |
| LICENSE | 9 months ago | |
| README.md | 9 months ago | |
| example.js | 9 months ago | |
| index.js | 9 months ago | |
| package.json | 9 months 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