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 0.0.14 to 0.0.15

test/diff.js

8

index.js

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

let node = await this.getRoot()
if (!node) return
if (!node) return this._unlockMaybe()

@@ -611,3 +611,3 @@ const seq = this.tree.feed.length + this.length

if (!node.children.length) return
if (!node.children.length) return this._unlockMaybe()

@@ -657,2 +657,6 @@ const i = c < 0 ? e : s

_unlockMaybe () {
if (this.autoFlush) this._unlock()
}
_unlock () {

@@ -659,0 +663,0 @@ const locked = this.locked

@@ -153,3 +153,3 @@ class SubTree {

async next () {
if (this.limit < 0) return null
if (this.limit === 0) return null
const res = await this._next()

@@ -156,0 +156,0 @@ if (!res || (res.left === null && res.right === null)) return null

{
"name": "hyperbee",
"version": "0.0.14",
"version": "0.0.15",
"description": "An append-only Btree running on a Hypercore.",

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

@@ -7,2 +7,3 @@ const Hyperbee = require('../../')

createRange,
insertRange,
rangeify,

@@ -35,6 +36,5 @@ collect

async function createRange (start, end, opts = end) {
async function insertRange (db, start, end) {
if (typeof end !== 'number') end = undefined
const db = create(opts)
const b = db.batch()

@@ -44,3 +44,11 @@ for (const r of rangeify(start, end)) {

}
await b.flush()
}
async function createRange (start, end, opts = end) {
if (typeof end !== 'number') end = undefined
const db = create(opts)
await insertRange(db, start, end)
return db

@@ -47,0 +55,0 @@ }

Sorry, the diff of this file is not supported yet

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