lib/connection.js
function runAfterHooks(connection, err, res, cb){
  async.eachSeries(connection.hooks.after, function (hook, nextHook) {
    hook(err, res, nextHook);
  }, cb);
}
function runAfterHooks(connection, err, res, cb){
  async.eachSeries(connection.hooks.after, function (hook, nextHook) {
    hook(err, res, nextHook);
  }, cb);
}
function runAfterHooks ( connection , err , res , cb ) { async . eachSeries ( connection . hooks . after , function ( hook , nextHook ) { hook ( err , res , nextHook ) ; } , cb ) ; }
Run all hook functions defined on `connection.hooks.after`.
Used to modify the response object and optionally handle any relevant errors if any.
@param {Object} connection - connection configuration object
@param {Error} err - response error object
@param {Response} res - SuperAgent HTTP Response object
@param {Function} cb - function with error (Error object, or a falsy value if finished succesfully) that is called when runAfterHooks finishes
Run all hook functions defined on connection . hooks . after . Used to modify the response object and optionally handle any relevant errors if any .