2.0.2 • Published 27 days ago

watch-drive v2.0.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
27 days ago

watch-drive

Watch a Hyperdrive or a Localdrive and get the diff

npm install watch-drive

Usage

const watch = require('watch-drive')

// returns a readable stream
const w = watch(drive, prefix)

for await (const { diff } of w) {
  for (const { type, key } of diff) {
    // type is either 'update' or 'delete'
    // key is the key that changed
    console.log(type, key)
  }
}

License

Apache-2.0

2.0.2

27 days ago

2.0.1

2 months ago

2.0.0

3 months ago

1.0.0

3 months ago