rudiment.js
function(index) {
      var that = this;

      return this.readByIndex(index).then(function(doc) {
        return that.delete(doc[that._dbType.id]);
      });
    }
function(index) {
      var that = this;

      return this.readByIndex(index).then(function(doc) {
        return that.delete(doc[that._dbType.id]);
      });
    }
function ( index ) { var that = this ; return this . readByIndex ( index ) . then ( function ( doc ) { return that . delete ( doc [ that . _dbType . id ] ) ; } ) ; }
Delete a document from the database by auto-index

@param {Number|String} index
@return {Promise}
Delete a document from the database by auto - index