async eachSeries如何按序列执行下去

async callback要执行完才会进到一下个序列

async.mapSeries(files, function(file, outerCB) {
  var all = fs.readdirsync("./0");
  async.mapSeries(all, function(item, cb){
      check(item, cb);
  }, outerCB);
}, function(err, results) {
  // This is called when everything's done
});

async.eachSeries in node.js

posted @ 2017-04-22 18:11  码不能停  阅读(1878)  评论(0)    收藏  举报