Socket
Socket
Sign inDemoInstall

hyperbee

Package Overview
Dependencies
Maintainers
2
Versions
109
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.14.2 to 2.15.0

17

index.js

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

this._view = !!opts._view
this._updated = false

@@ -423,2 +422,7 @@ this._onappendBound = this._view ? null : this._onappend.bind(this)

getBySeq (seq, opts) {
const b = new Batch(this, this._makeSnapshot(), null, true, opts)
return b.getBySeq(seq)
}
put (key, value, opts) {

@@ -676,2 +680,13 @@ const b = new Batch(this, this.core, null, true, opts)

async getBySeq (seq, opts) {
const encoding = this._getEncoding(opts)
try {
const block = (await this.getBlock(seq)).final(encoding)
return { key: block.key, value: block.value }
} finally {
await this._closeSnapshot()
}
}
async get (key, opts) {

@@ -678,0 +693,0 @@ const encoding = this._getEncoding(opts)

2

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

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

@@ -187,2 +187,8 @@ # Hyperbee 🐝

#### `const { key, value } = await db.getBySeq(seq, [options])`
Get the key and value from a block number.
`seq` is the Hypercore index. Returns `null` if block doesn't exists.
#### `const stream = db.replicate(isInitiatorOrStream)`

@@ -189,0 +195,0 @@

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