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 1.0.0 to 1.0.1

5

index.js

@@ -358,2 +358,3 @@ const codecs = require('codecs')

...opts,
sub: this._sub,
active,

@@ -374,3 +375,3 @@ onseq (seq) {

} else {
opts = encRange(this.keyEncoding, { ...opts, active })
opts = encRange(this.keyEncoding, { ...opts, sub: this._sub, active })
}

@@ -395,3 +396,3 @@

if (typeof right === 'number') right = this.checkout(right)
if (this.keyEncoding) opts = encRange(this.keyEncoding, { ...opts, active })
if (this.keyEncoding) opts = encRange(this.keyEncoding, { ...opts, sub: this._sub, active })
else opts = { ...opts, active }

@@ -398,0 +399,0 @@ return iteratorToStream(new DiffIterator(new Batch(this, false, false, opts), new Batch(right, false, false, opts), opts), active)

2

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

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

@@ -173,2 +173,3 @@ const tape = require('tape')

await db.put(key, 'hello world')
await parent.put(key, 'parent hello world')
reference.push(key)

@@ -240,1 +241,23 @@ }

})
tape('multiple levels of sub, entries outside sub', async t => {
const db = create({ sep: '!' })
const helloSub = db.sub('hello')
const worldSub = helloSub.sub('world')
await helloSub.put('a', 'b')
await worldSub.put('b', 'c')
const expected = [['b', 'c']]
for await (const { key, value } of worldSub.createReadStream()) {
const next = expected.shift()
if (!next) {
t.fail('iterated unexpected value')
break
}
t.same(key, next[0])
t.same(value, next[1])
}
t.same(expected.length, 0)
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