1.0.0 • Published 10 years ago

level-update-stream v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
10 years ago

level-update-stream

A pull stream that writes to a leveldb instance, but only when it's actually a change.

var pull = require('pull-stream')
var level = require('level')

var db = level(path...)

pull(
  source,
  update(db, function (err, updateCount) {
    //this callback is optional.
    console.log(updateCount, 'records written')
  })
)

If you want to use this with ordinary streams, use pull-stream-to-stream

License

MIT