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.
18 lines
288 B
JavaScript
18 lines
288 B
JavaScript
|
2 years ago
|
var all = require('./')
|
||
|
|
var after = all(function () {
|
||
|
|
console.log('done')
|
||
|
|
})
|
||
|
|
|
||
|
|
function doSomething(n, cb) {
|
||
|
|
setTimeout(function () {
|
||
|
|
console.log('N', n)
|
||
|
|
}, Math.random() * 100)
|
||
|
|
}
|
||
|
|
|
||
|
|
doSomething(1, after())
|
||
|
|
doSomething(2, after())
|
||
|
|
doSomething(3, after())
|
||
|
|
doSomething(4, after())
|
||
|
|
|
||
|
|
|