def remove(args = {})
      doc     = args[:doc]
      doc_id  = args[:doc_id]
      doc_rev = args[:doc_rev]
      options = args[:options]

      %x{
        var pouchPromise;
        if (doc) {
          pouchPromise = #{@native}.remove(#{doc.to_n}, #{options.to_n})
        } else {
          pouchPromise = #{@native}.remove(doc_id, doc_rev, #{options.to_n})
        }
      }

      as_opal_promise(`pouchPromise`)
    end
def remove(args = {})
      doc     = args[:doc]
      doc_id  = args[:doc_id]
      doc_rev = args[:doc_rev]
      options = args[:options]

      %x{
        var pouchPromise;
        if (doc) {
          pouchPromise = #{@native}.remove(#{doc.to_n}, #{options.to_n})
        } else {
          pouchPromise = #{@native}.remove(doc_id, doc_rev, #{options.to_n})
        }
      }

      as_opal_promise(`pouchPromise`)
    end
Deletes a document from the database. It can be called in one of two ways:

    db.remove(doc: <full document hash>)
    # or, alternatively
    db.remove(doc_id: <id>, doc_rev: <revision>)

 @param args [Hash] The arguments for the function
 @option args [Hash] :doc A document with _id and _rev to be removed. If defined,
   :doc_id and :doc_rev will be ignored.
 @option args [String] :doc_id A document's id (requires :doc_rev)
 @option args [String] :doc_rev A document's revision (requires :doc_id)
 @option args [Hash] :options Extra options (refer to the official doc).
 @return [Promise<Hash>]