le

level-events

Get an event everytime something is written / read / deleted using levelup. In includes streams support as well.

Showing:

Popularity

Downloads/wk

5

GitHub Stars

17

Maintenance

Last Commit

6yrs ago

Contributors

0

Package

Dependencies

1

Size (min+gzip)

2.4KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

level-events

Get an event everytime something is written / read / deleted using levelup. In includes streams support as well.

npm install level-events

build status dat

Usage

var events = require('level-events')

events(db) // db is a levelup instance
  .on('read', function(key, value) {
    console.log('[read]', key, value)
  })
  .on('write', function(key, value) {
    console.log('[write]', key, value)
  })
  .on('delete', function(key) {
    console.log('[delete]', key)
  })

db.put('hello', 'world', function() {
  db.createReadStream().resume()
})

Running the above example will print something like

[write] hello world
[read] hello world

License

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100