level-changes
v0.0.1
Published
Stream changes on a leveldb database
Downloads
12
Readme
Returns a stream of changes to a leveldb database.
Usage
var db = level('foo');
var c = changes(db, [opts]);
c.on('data', function(change) {
console.log("Change:", change)
})
The change objects emitted have the properties:
{
type: 'put', // or 'del'
key: <key>,
value: <value> // only present if type is 'put'
}
If {history: true} is set in opts then the stream will first output a 'put' change for each row already present in the database.