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

byte-range-stream

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

byte-range-stream - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

13

package.json
{
"name": "byte-range-stream",
"version": "1.0.0",
"version": "2.0.0",
"description": "Create a multipart/byteranges stream based on passed ranges",

@@ -16,3 +16,8 @@ "main": "src/index.js",

},
"keywords": ["byteranges", "multipart", "multi-part", "range"],
"keywords": [
"byteranges",
"multipart",
"multi-part",
"range"
],
"author": "Espen Hovlandsdal <espen@hovlandsdal.com>",

@@ -38,3 +43,5 @@ "license": "MIT",

},
"files": ["src/"]
"files": [
"src/"
]
}

@@ -22,3 +22,3 @@ # byte-range-stream

const totalSize = fs.statSync(filePath).size
const getChunk = (start, end) => fs.createReadStream(filePath, {start, end})
const getChunk = range => fs.createReadStream(filePath, {start: range.start, end: range.end})

@@ -25,0 +25,0 @@ const byteStream = new ByteRangeStream({

@@ -56,3 +56,3 @@ 'use strict'

const isLast = i === lastIndex
this._append(range, next => next(this._options.getChunk(range.start, range.end)), isLast)
this._append(range, next => next(this._options.getChunk(range)), isLast)
this._numChunks++

@@ -59,0 +59,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