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 2.3.0 to 2.4.0

4

index.js

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

constructor (feed, opts = {}) {
// this.feed is now deprecated, and will be this.core going forward
this.feed = feed
this.core = feed

@@ -448,3 +450,5 @@ this.keyEncoding = opts.keyEncoding ? codecs(opts.keyEncoding) : null

this.tree = tree
// this.feed is now deprecated, and will be this.core going forward
this.feed = feed
this.core = feed
this.blocks = cache ? new Map() : null

@@ -451,0 +455,0 @@ this.autoFlush = !batchLock

2

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

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

@@ -16,3 +16,3 @@ # Hyperbee 🐝

const Hyperbee = require('hyperbee')
const db = new Hyperbee(feed, {
const db = new Hyperbee(core, {
keyEncoding: 'utf-8', // can be set to undefined (binary), utf-8, ascii or and abstract-encoding

@@ -52,3 +52,3 @@ valueEncoding: 'binary' // same options as above

#### `const db = new Hyperbee(feed, [options])`
#### `const db = new Hyperbee(core, [options])`

@@ -87,3 +87,3 @@ Make a new Hyperbee instance. `feed` should be a [Hypercore](https://github.com/holepunchto/hypercore).

const cas = (prev, next) => prev.value !== next.value
const db = new Hyperbee(feed, { keyEncoding: 'utf8', valueEncoding: 'utf8' })
const db = new Hyperbee(core, { keyEncoding: 'utf8', valueEncoding: 'utf8' })
await db.put('key', 'value')

@@ -119,3 +119,3 @@ console.log(await db.get('key')) // { seq: 1, key: 'key', value: 'value' }

const cas = (prev) => prev.value === 'value*'
const db = new Hyperbee(feed, { keyEncoding: 'utf8', valueEncoding: 'utf8' })
const db = new Hyperbee(core, { keyEncoding: 'utf8', valueEncoding: 'utf8' })
await db.put('key', 'value')

@@ -122,0 +122,0 @@ console.log(await db.get('key')) // { seq: 1, key: 'key', value: 'value' }

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