lib/hooks.js
function processResponse(err, res, cb){
  if(!err) {
    if(Array.isArray(res.body)){
      res.body.forEach(function (body) {
        castRecordDateFields(body);
      });
    } else if (_.isObject(res.body)) {
      castRecordDateFields(res.body);
    }
  }
  cb();
}
function processResponse(err, res, cb){
  if(!err) {
    if(Array.isArray(res.body)){
      res.body.forEach(function (body) {
        castRecordDateFields(body);
      });
    } else if (_.isObject(res.body)) {
      castRecordDateFields(res.body);
    }
  }
  cb();
}
function processResponse ( err , res , cb ) { if ( ! err ) { if ( Array . isArray ( res . body ) ) { res . body . forEach ( function ( body ) { castRecordDateFields ( body ) ; } ) ; } else if ( _ . isObject ( res . body ) ) { castRecordDateFields ( res . body ) ; } } cb ( ) ; }
Process HTTP response. Converts response objects date fields from Strings to Dates.
@param {Error} err - HTTP response error
@param {Response} res - SuperAgent HTTP Response object
@param {Function} cb - function that is called when this hook finishes
Process HTTP response . Converts response objects date fields from Strings to Dates .