【发布时间】:2013-03-03 10:28:25
【问题描述】:
我想在nodejs 中使用asyncjs 从瀑布函数链中跳转一个函数。
我的代码如下所示:
async.waterfall([
function(next){
if(myBool){
next(null);
}else{
// Bypass the 2nd function
}
},
// I want to bypass this method if myBool is false in the 1st function
function(next){
},
// Always called
function(next){
}
]);
你知道不使用 put 的正确方法吗:
if(!myBool){
return next();
}
在我要绕过的函数中。
谢谢!
【问题讨论】:
标签: node.js asynchronous callback waterfall