I need to pass some parameters to the initial function of async waterfall(). The proposed method https://github.com/caolan/async/issues/14 does not work for me as I need to pass it the response from an ExpressJS function
exports.categories = (req, res) ->
async.waterfall [
(callback) ->
# need req here...
See async.apply().
async.waterfall([
async.apply(function(req, callback) {}, req);
]);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With