Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hyperbee

Package Overview
Dependencies
Maintainers
2
Versions
111
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 1.6.1 to 1.6.2

6

index.js

@@ -307,3 +307,5 @@ const codecs = require('codecs')

if (this.prefix && !this._checkout) this.keyEncoding = prefixEncoding(this.prefix, this.keyEncoding)
if (this.prefix && opts._sub) {
this.keyEncoding = prefixEncoding(this.prefix, this.keyEncoding)
}
}

@@ -445,2 +447,3 @@

_ready: this.ready(),
_sub: false,
sep: this.sep,

@@ -470,2 +473,3 @@ prefix: this.prefix,

_ready: this.ready(),
_sub: true,
prefix,

@@ -472,0 +476,0 @@ sep: this.sep,

2

package.json
{
"name": "hyperbee",
"version": "1.6.1",
"version": "1.6.2",
"description": "An append-only Btree running on a Hypercore.",

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

@@ -62,1 +62,31 @@ const test = require('tape')

})
test('diff on multi-level sub db with parent checkout', async function (t) {
const db = await create()
const sub = db.sub('hello').sub('world')
await sub.put('a', 'b')
await sub.put('b', 'c')
const v1 = sub.version
await sub.put('c', 'd')
await sub.del('a')
const v2 = sub.version
await sub.put('e', 'f')
await sub.put('g', 'h')
const c1 = db.checkout(v2).sub('hello').sub('world')
const c2 = sub.checkout(v2)
const entries = await collect(c1.createDiffStream(v1))
const entries2 = await collect(c2.createDiffStream(v1))
t.same(entries.length, 2)
t.same(entries2.length, 2)
t.same(entries[0].right.key, entries2[0].right.key)
t.same(entries[1].left.key, entries2[1].left.key)
t.end()
})
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