This repository has been archived on 2026-03-06. You can view files and clone it, but cannot push or open issues or pull requests.
todo/node_modules/all/example.js
2025-06-13 14:04:40 +08:00

18 lines
288 B
JavaScript

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())