How do I apply the same arguments to an array of functions?
Works:
async.parallel([func(arg, arg2), func2(arg, arg2)],
function() {
next();
});
The array has indeterminate / various functions functions inside though, so I'm not sure which functions I should be sending to the parallel method.
In various files I'm building the functions array:
funcArray.push(func2)
As a result I have an array like this:
[func, func2]
I would like to just do:
async.parallel(funcArray,
function() {
next();
});
and have all the same arguments be applied to all the functions. How can I do this? Thanks.
Ended up writing my own:
_.each(obj, function (func) {
func(req, res, function () {
i++
if (i == objSize) {
next()
}
})
})