{
"repo": "hyperbee-diff-stream",
"timestamp": "2026-01-16T23:56:39.030Z",
"entryPoint": "index.js",
"exports": {
"packageJson": {
"main": "index.js"
}
},
"api": {
"file": "index.js",
"exports": [
{
"type": "default",
"name": "BeeDiffStream"
}
],
"classes": [
{
"name": "BeeDiffStream"
}
],
"functions": [
{
"name": "getKey"
},
{
"name": "areEqual"
},
{
"name": "unionCompare"
},
{
"name": "decodeEntry"
},
{
"name": "createUnionMap"
},
{
"name": "unionMap"
},
{
"name": "encodeKey"
}
]
},
"readme": {
"content": "# Hyperbee Diff Stream\n\nGet the diff stream between two snapshots of a hyperbee. Ideal for autobase views.\n\nFor example, when reconnecting after having worked locally for a while,\nit can get the diff stream between a snapshot from just before and from just after the autobase linearisation.\nEven if several peers (including you in your local fork) made a lot of changes to a particular key, the diff stream will still yield only a single change for it.\n\n## Install\n`npm i hyperbee-diff-stream`\n\n## Versioning and Compatibility\nV1 uses features introduced in Hyperbee ^2.5.0, Hypercore ^10.8.1 and autobase^6.0.0\n\nV2 works with Hypercore V11, Autobase V7 and Corestore V7.\n\n## Usage\nSee [example.js](./example.js)\n\n## API\n\n#### `const diffStream = new BeeDiffStream(leftSnapshot, rightSnapshot, [options])`\n\nMake a new `BeeDiffStream` instance, which is the stream of changes to get from the state of `leftSnapshot` to that of `rightSnapshot`.\n\nThe stream is ordered by key.\n\n`leftSnapshot` and `right",
"sections": [
"intro",
"install",
"versioning and compatibility",
"usage",
"api"
],
"hasApi": true,
"hasExamples": true,
"exampleCount": 2,
"examples": [
"{\n gt: 'only consider keys > than this',\n gte: 'only consider keys >= than this',\n lt: 'only consider keys < than this',\n lte: 'only consider keys <= than this',\n keyEncoding: 'utf-8', // a key encoding\n valueEncoding: 'json' // a value encoding,\n closeSnapshots: true // set to false if you wish to use the passed-in snapshots after the diffStream is fully yielded.\n}",
"{\n left: { seq, key, value },\n right: { seq, key, value }\n}"
]
},
"patterns": []
}