Like async waterfall function

I need a function works like “async waterfall” in javascript (https://caolan.github.io/async/docs.html#waterfall ), any suggestions?

function structure,

async.waterfall([
function(callback) {
callback(null, ‘one’, ‘two’);
},
function(arg1, arg2, callback) {
// arg1 now equals ‘one’ and arg2 now equals ‘two’
callback(null, ‘three’);
},
function(arg1, callback) {
// arg1 now equals ‘three’
callback(null, ‘done’);
}
], function (err, result) {
// result now equals ‘done’
});

1 Like

Oh i found it my self.:wink: this is the link https://github.com/tuanpmt/lua-async

1 Like

This looks interesting. In which scenario would you use it?