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.0.1 to 1.1.0

10

index.js

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

async insertKey (key, child = null) {
async insertKey (key, child = null, overwrite = true) {
let s = 0

@@ -98,2 +98,3 @@ let e = this.keys.length

if (c === 0) {
if (!overwrite) return true
this.changed = true

@@ -471,2 +472,3 @@ this.keys[mid] = key

this.options = options
this.overwrite = options.overwrite !== false
this.locked = null

@@ -578,2 +580,3 @@ this.onseq = this.options.onseq || noop

if (c === 0) {
if (!this.overwrite) return this._unlockMaybe()
node.setKey(mid, target)

@@ -591,3 +594,4 @@ return this._append(root, seq, key, value)

let needsSplit = !(await node.insertKey(target, null))
let needsSplit = !(await node.insertKey(target, null, this.overwrite))
if (!node.changed) return this._unlockMaybe()

@@ -599,3 +603,3 @@ while (needsSplit) {

if (parent) {
needsSplit = !(await parent.insertKey(median, right))
needsSplit = !(await parent.insertKey(median, right, false))
node = parent

@@ -602,0 +606,0 @@ } else {

{
"name": "hyperbee",
"version": "1.0.1",
"version": "1.1.0",
"description": "An append-only Btree 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