2.0.3 • Published 9 months ago

watch-drive v2.0.3

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
9 months 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.3

9 months ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.0

1 year ago