Socket
Socket
Sign inDemoInstall

hypercore-byte-stream

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hypercore-byte-stream - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

10

index.js

@@ -35,3 +35,3 @@ const assert = require('assert')

assert(!blockLength || blockLength >= 0, 'end must be >= 0')
assert(!byteLength || byteLength >= -1, 'length must be a positive integer or -1')
assert(!byteLength || byteLength >= 0, 'length must be a >= 0 or -1')

@@ -41,3 +41,3 @@ this.feed = feed

start: blockOffset || 0,
end: (blockOffset && blockLength) ? blockOffset + blockLength : -1,
end: (blockOffset && (blockLength !== undefined)) ? blockOffset + blockLength : -1,
byteOffset: byteOffset || 0,

@@ -86,3 +86,3 @@ length: (byteLength !== undefined) ? byteLength : -1

function onstart (err, index, off) {
if (err) return cb(err)
if (err) return self.destroy(err)
if (self._ended || self.destroyed) return

@@ -140,2 +140,4 @@

if (this._ended) return this.push(null)
if (this._range.length === 0) return this.push(null)
if (!this._opened) {

@@ -145,3 +147,3 @@ return this._open(size)

if (this._range.end !== -1 && this._range.start > this._range.end || this._range.length === 0) {
if ((this._range.end !== -1 && this._range.start > this._range.end) || this._range.length === 0) {
return this.push(null)

@@ -148,0 +150,0 @@ }

2

package.json
{
"name": "hypercore-byte-stream",
"version": "1.0.2",
"version": "1.0.3",
"description": "A Readable stream wrapper around Hypercore that supports reading byte ranges.",

@@ -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