rudiment.js
function(id, updates) {
      var that = this;

      return this.read(id).then(function(doc) {
        return that._updateDoc(doc, updates);
      });
    }
function(id, updates) {
      var that = this;

      return this.read(id).then(function(doc) {
        return that._updateDoc(doc, updates);
      });
    }
function ( id , updates ) { var that = this ; return this . read ( id ) . then ( function ( doc ) { return that . _updateDoc ( doc , updates ) ; } ) ; }
Update a document in the database by database ID

@param {String} id
@param {Object} updates - updates to apply to document
@return {Promise}
Update a document in the database by database ID