Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sub-encoder

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sub-encoder - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

4

index.js

@@ -19,7 +19,3 @@ const isOptions = require('is-options')

}
this.userEncoding = codecs(opts && opts.keyEncoding)
if (prefix && this.userEncoding) {
prefix = this.userEncoding.encode(prefix)
}

@@ -26,0 +22,0 @@ const parent = opts && opts._parent

2

package.json
{
"name": "sub-encoder",
"version": "1.0.2",
"version": "1.0.3",
"description": "Generate sub encodings for key/value stores",

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

@@ -126,15 +126,2 @@ const test = require('brittle')

test('can create subs with dynamic keys/encodings', async t => {
const bee = new Hyperbee(new Hypercore(ram))
const enc = new SubEncoder()
const sub1 = enc.sub({ name: 's1' }, { keyEncoding: 'json' })
const sub2 = sub1.sub({ name: 'key1' }, { keyEncoding: 'json' })
await bee.put({ name: 'key' }, b.from('hello'), { keyEncoding: sub2 })
const n2 = await collect(bee.createReadStream(sub2.range()))
t.is(n2.length, 1)
})
async function collect (ite) {

@@ -141,0 +128,0 @@ const res = []

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