// fixes callbackified functions used in async.waterfall
if(res!==undefined){
returncb(err,res);
}
returncb(err);
});
returncallbackFn.apply(null,args);
}
returnorigFn.apply(null,arguments);
};
}
functiondeprecateRecursive(module,key){
if(!module){
return;
}
if(key){
parts.push(key);
}
varkeys=Object.keys(module);
keys.forEach(function(key){
if(ignoreKeys.includes(key)){
return;
}
if(typeofmodule[key]==='object'){
deprecateRecursive(module[key],key);
}
if(typeofmodule[key]==='function'){
module[key]=require('util').deprecate(module[key],'.async.'+(parts.concat([key]).join('.'))+' usage is deprecated use .'+(parts.concat([key]).join('.'))+' directly!');