katchup
v0.0.3
Published
An alternative changes reader for couchdb.
Downloads
70
Readme
katchup
Install
npm install git+ssh://[email protected]:revington/katchup.git#main
Usage
import katchup from 'katchup'
const feed = katchup(url, options);
feed.on('error', function (err) {
// Manage errors here
});
feed.on('change', function (change) {
// Do something with each change.
});
feed.on('catchup', function (catchup) {
// Do something when the catchup event is captured
feed.stop();
});
feed.start();
Methods
- start() - lauches the process.
- stop() - stops the process.
Events
Options
Available options are:
- timeout (number) - milliseconds to wait for a change before the response is sent, default:
1000
. - since (string) - start the results from the given sequence, default:
'0'
. - limit (number) - number of results to obtain, default:
25
. - includeDocs (boolean) - include the associated document with each result, default:
true
.