1.1.2 • Published 7 years ago
level-value v1.1.2
level-value
Subscribe to a leveldb value.
- exposes
put
,batch
anddel
changes through one unified interface - accepts RegExps
- performs an initial
get
for the value (except with RegExp)
Usage
const subscribe = require('level-value')
subscribe(db, 'key', value => {
console.log(value)
}).off()
// Alternative EventEmitter API
const sub = subscribe(db, 'key')
sub.on('value', console.log)
sub.off()
Install
$ npm install level-value
API
subscribe(db, key, fn)
#on('value', fn)
#off()
License
MIT