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

hyperdrive

Package Overview
Dependencies
Maintainers
1
Versions
273
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperdrive - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

6

lib/feed.js

@@ -44,7 +44,7 @@ var thunky = require('thunky')

var self = this
var binary = this._decode ? opts.binary : opts.binary !== false
var bytes = this._decode ? opts.bytes : opts.bytes !== false
var start = opts.start || 0
var cursor = binary ? this.cursor() : null
var cursor = bytes ? this.cursor() : null
return binary ? from(readCursor) : from.obj(readBlocks)
return bytes ? from(readCursor) : from.obj(readBlocks)

@@ -51,0 +51,0 @@ function readBlocks (size, cb) {

@@ -59,5 +59,6 @@ var protocol = require('./protocol')

var len = peer.remoteBitfield.buffer.length * 8
var block = -1
for (var j = 0; j < subswarm.feed.want.length; j++) {
var block = subswarm.feed.want[j].block
block = subswarm.feed.want[j].block
if (peer.amRequesting.get(block)) continue

@@ -72,3 +73,3 @@ if (peer.remoteBitfield.get(block) && !subswarm.feed.bitfield.get(block)) {

for (var i = 0; i < len; i++) {
var block = (offset + i) % len
block = (offset + i) % len
if (peer.amRequesting.get(block)) continue

@@ -75,0 +76,0 @@ if (peer.remoteBitfield.get(block) && !subswarm.feed.bitfield.get(block)) {

{
"name": "hyperdrive",
"version": "1.2.0",
"version": "1.3.0",
"description": "A file sharing network based on rabin file chunking and append only feeds of data verified by merkle trees.",

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

@@ -152,3 +152,3 @@ var tape = require('tape')

tape('file stream', function (t) {
t.plan(4)
t.plan(5)
var drive = create()

@@ -170,2 +170,3 @@

feed.get(0, function (err, entry) {
t.error(err, 'no error')
drive.get(entry).createStream()

@@ -172,0 +173,0 @@ .on('data', function (data) {

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