I am looking for a way to finish async.js loop early before all the callbacks get called. Is there any built-in function to do so? If not, is there any way around to achieve the desired functionality?
async.forEachOf(children, function(child, i, cb){
if (condition == true) {
// finish early - call cb() for all iterations
}
cb()
}, function(err){
})