async.map(list, function(object, callback) {
async.series([
function(callback) {
console.log(\"1\");
var booltest = false;
// assumi
I'm passing an object to differentiate between an error and just functionality. Which looks like:
function logAppStatus(status, cb){
if(status == 'on'){
console.log('app is on');
cb(null, status);
}
else{
cb({'status' : 'functionality', 'message': 'app is turned off'}) // <-- object
}
}
Later:
async.waterfall([
getAppStatus,
logAppStatus,
checkStop
], function (error) {
if (error) {
if(error.status == 'error'){ // <-- if it's an actual error
console.log(error.message);
}
else if(error.status == 'functionality'){ <-- if it's just functionality
return
}
}
});