lib/query.js
function(err, res) {
    if (_.isFunction(callback)) {
      try {
        res = callback(err, res);
        err = null;
      } catch(e) {
        err = e;
      }
    }
    if (err) {
      deferred.reject(err);
    } else {
      deferred.resolve(res);
    }
  }
function(err, res) {
    if (_.isFunction(callback)) {
      try {
        res = callback(err, res);
        err = null;
      } catch(e) {
        err = e;
      }
    }
    if (err) {
      deferred.reject(err);
    } else {
      deferred.resolve(res);
    }
  }
function ( err , res ) { if ( _ . isFunction ( callback ) ) { try { res = callback ( err , res ) ; err = null ; } catch ( e ) { err = e ; } } if ( err ) { deferred . reject ( err ) ; } else { deferred . resolve ( res ) ; } }
callback and promise resolution;
callback and promise resolution ;