couchdb-change-events
Advanced tools
Comparing version 1.0.6 to 1.0.7
{ | ||
"name": "couchdb-change-events", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "This library will emit changes done in couchdb.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
[![Build Status](https://travis-ci.org/soukand/couchdb-change-events.svg?branch=master)](https://travis-ci.org/soukand/couchdb-change-events) [![Code Climate](https://codeclimate.com/github/soukand/couchdb-change-events/badges/gpa.svg)](https://codeclimate.com/github/soukand/couchdb-change-events) [![Issue Count](https://codeclimate.com/github/soukand/couchdb-change-events/badges/issue_count.svg)](https://codeclimate.com/github/soukand/couchdb-change-events) [![Test Coverage](https://codeclimate.com/github/soukand/couchdb-change-events/badges/coverage.svg)](https://codeclimate.com/github/soukand/couchdb-change-events/coverage) | ||
The library is still in progress. It works, but it is missing some features and tests. | ||
I see that some of you have already downloaded it and it had a bug in it. | ||
I will provide simple example how to use it. Documentation will come soon. | ||
### Usage | ||
```javascript | ||
const CouchdbChangeEvents = require('couchdb-change-events'); | ||
const couchdbEvents = new CouchdbChangeEvents({ | ||
host: 'localhost', | ||
db: 'my_database' | ||
}); | ||
couchdbEvents.on('data', (data) => { | ||
console.log('data:', data); | ||
}); | ||
couchdbEvents.on('couchdb_status', (status) => { | ||
console.log(`couchdb status: ${status}`); | ||
}); | ||
couchdbEvents.on('couchdb_error', (error) => { | ||
console.log('error', error); | ||
}); | ||
``` |
@@ -76,4 +76,4 @@ const http = require('http'), | ||
this.couchDbConnection.on('data', this.onCouchdbChange); | ||
this.couchDbConnection.on('end', this.reconnect); | ||
this.couchDbConnection.on('data', this.onCouchdbChange.bind(this)); | ||
this.couchDbConnection.on('end', this.reconnect.bind(this)); | ||
}).on('error', (error) => { | ||
@@ -80,0 +80,0 @@ this.emitError(error); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16756
30