couchdb-changes-response

Mimic CouchDB's `_changes` response in a streaming fashion

Usage no npm install needed!

<script type="module">
  import couchdbChangesResponse from 'https://cdn.skypack.dev/couchdb-changes-response';
</script>

README

couchdb-changes-response

Build Status

Mimic CouchDB's _changes response in a streaming fashion.

Installation

npm i couchdb-changes-response

Usage

Please note: this module is heavily WIP, only continuous feed is supported right now.

var ChangesResponse = require('couchdb-changes-response')

var response = new ChangesResponse({
  type: 'continuous'
}))

response.write({
  id: 'foobar',
  seq: 132,
  doc: {
    id: 'foobar',
    bar: 'foo'
  })
})