byte-range-stream
Advanced tools
Comparing version 1.0.0 to 2.0.0
{ | ||
"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 @@ }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8426