lib/db.js
function _result(err, dbName, docId, message) {
    var result = {
      id: util.format('%s%s%s', dbName, (docId) ? '/' : '', docId || ''),
      message: message || util.format('%s (%s)', err.error, err.status_code)
    };
    if (err) {
      result.error = err;
    }
    return result;
  }
function _result(err, dbName, docId, message) {
    var result = {
      id: util.format('%s%s%s', dbName, (docId) ? '/' : '', docId || ''),
      message: message || util.format('%s (%s)', err.error, err.status_code)
    };
    if (err) {
      result.error = err;
    }
    return result;
  }
function _result ( err , dbName , docId , message ) { var result = { id : util . format ( '%s%s%s' , dbName , ( docId ) ? '/' : '' , docId || '' ) , message : message || util . format ( '%s (%s)' , err . error , err . status_code ) } ; if ( err ) { result . error = err ; } return result ; }
construct result object, the existence of error field indicates whether the result is a success or not
construct result object the existence of error field indicates whether the result is a success or not