Socket
Socket
Sign inDemoInstall

then-read-stream

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

then-read-stream - npm Package Compare versions

Comparing version 2.0.7 to 2.0.8

10

lib/index.js

@@ -12,2 +12,3 @@ "use strict";

}
const maxStreamReadSize = 1 * 1024 * 1024; // Maximum request length on read-stream operation
/**

@@ -75,4 +76,9 @@ * Error message

// continue reading from stream if required
if (remaining > 0 && !this.endOfStream) {
bytesRead += await this._read(buffer, offset + bytesRead, remaining);
while (remaining > 0 && !this.endOfStream) {
const reqLen = Math.min(remaining, maxStreamReadSize);
const chunkLen = await this._read(buffer, offset + bytesRead, reqLen);
bytesRead += chunkLen;
if (chunkLen < reqLen)
break;
remaining -= chunkLen;
}

@@ -79,0 +85,0 @@ return bytesRead;

6

package.json
{
"name": "then-read-stream",
"version": "2.0.7",
"version": "2.0.8",
"description": "Read from a readable stream just like a file",

@@ -42,7 +42,7 @@ "author": {

"@types/mocha": "^5.2.7",
"@types/node": "^12.11.1",
"@types/node": "^12.12.3",
"chai": "^4.2.0",
"coveralls": "^3.0.7",
"del-cli": "^3.0.0",
"mocha": "^6.2.1",
"mocha": "^6.2.2",
"nyc": "^14.1.1",

@@ -49,0 +49,0 @@ "remark-cli": "^7.0.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