Socket
Socket
Sign inDemoInstall

hyperbee

Package Overview
Dependencies
Maintainers
2
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperbee - npm Package Compare versions

Comparing version 2.18.2 to 2.19.0

34

index.js

@@ -251,2 +251,10 @@ const codecs = require('codecs')

updateChildren (seq, block) {
for (const child of this.children) {
if (!child.value || child.seq !== seq) continue
child.value.block = block
child.value.updateChildren(seq, block)
}
}
static create (block) {

@@ -1029,6 +1037,8 @@ const node = new TreeNode(block, [], [], 0)

const block = new BatchEntry(seq, this, key, value, index)
if (!root.block) root.block = block
root.block = block
this.root = root
this.length++
this.blocks.set(seq, block)
root.updateChildren(seq, block)
return

@@ -1149,4 +1159,6 @@ }

this._updateOnce = !!opts.updateOnce
this._onchange = opts.onchange || null
this.on('newListener', autoFlowOnUpdate)
this.ready().catch(safetyCatch)

@@ -1172,2 +1184,7 @@ }

this.current = this._eager ? this.bee.checkout(1, opts) : this.bee.snapshot(opts)
if (this._onchange) {
if (this._eager) await this._onchange()
this._consume()
}
}

@@ -1240,3 +1257,3 @@

if (this.current.core.fork !== this.previous.core.fork) {
return this._yield()
return await this._yield()
}

@@ -1248,3 +1265,3 @@

for await (const data of this.stream) { // eslint-disable-line
return this._yield()
return await this._yield()
}

@@ -1260,5 +1277,14 @@ } finally {

_yield () {
async _yield () {
this.currentMapped = this.map(this.current)
this.previousMapped = this.map(this.previous)
if (this._onchange) {
try {
await this._onchange()
} catch (err) {
safetyCatch(err)
}
}
this.emit('update')

@@ -1265,0 +1291,0 @@ return { done: false, value: [this.currentMapped, this.previousMapped] }

2

package.json
{
"name": "hyperbee",
"version": "2.18.2",
"version": "2.19.0",
"description": "An append-only B-tree running on a Hypercore.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc