You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In async.during example, if we pass a optional value in callback of iterate, javascript show error of callback is not a function in truthy functon.
var count = 0;
async.during(
function (callback) {
console.warn(arguments);
return callback(null, count < 5);
},
function (callback) {
count++;
setTimeout(function(){
callback(null, count);
}, 1000);
},
function (err, res) {
console.info(res); // 5 seconds have passed
}
);
Is there anything I am doing wrong? I guess this is also mentioned in documentation that callback will be passed an error and any arguments passed to the final fn's callback