{
"repo": "watch-drive",
"timestamp": "2026-01-16T23:55:53.025Z",
"entryPoint": "index.js",
"exports": {
"packageJson": {
"main": "index.js"
}
},
"api": {
"file": "index.js",
"exports": [
{
"type": "default",
"name": "watch"
}
],
"classes": [
{
"name": "HyperdriveWatcher"
}
],
"functions": [
{
"name": "watch"
},
{
"name": "createLocalWatch"
},
{
"name": "mapReadable"
},
{
"name": "toKey"
}
]
},
"readme": {
"content": "# watch-drive\n\nWatch a Hyperdrive or a Localdrive and get the diff\n\n```\nnpm install watch-drive\n```\n\n## Usage\n\n```js\nconst watch = require('watch-drive')\n\n// returns a readable stream\nconst w = watch(drive, prefix)\n\nfor await (const { diff } of w) {\n for (const { type, key } of diff) {\n // type is either 'update' or 'delete'\n // key is the key that changed\n console.log(type, key)\n }\n}\n```\n\n## License\n\nApache-2.0\n",
"sections": [
"intro",
"usage",
"license"
],
"hasApi": true,
"hasExamples": true,
"exampleCount": 2,
"examples": [
"npm install watch-drive",
"const watch = require('watch-drive')\n\n// returns a readable stream\nconst w = watch(drive, prefix)\n\nfor await (const { diff } of w) {\n for (const { type, key } of diff) {\n // type is either 'update' or 'delete'\n // key is the key that changed\n console.log(type, key)\n }\n}"
]
},
"patterns": [
"streaming"
]
}