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 1.0.0 to 1.0.1

8

lib/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var assert = require("assert");
var Deferred = /** @class */ (function () {

@@ -47,3 +48,3 @@ function Deferred() {

return this.read(buffer, offset, length).then(function (bytesRead) {
_this.peekQueue.push(buffer.slice(offset, length));
_this.peekQueue.push(buffer.slice(offset, bytesRead));
return bytesRead;

@@ -95,4 +96,3 @@ });

var _this = this;
if (this.request)
throw new Error("Concurrent read operation");
assert.ok(!this.request, "Concurrent read operation?");
if (this.endOfStream) {

@@ -104,3 +104,3 @@ return Promise.reject(exports.EndOfStream);

readBuffer.copy(buffer, offset);
return Promise.resolve(length);
return Promise.resolve(readBuffer.length);
}

@@ -107,0 +107,0 @@ else {

{
"name": "then-read-stream",
"version": "1.0.0",
"version": "1.0.1",
"description": "Read from a readable stream just like a file",

@@ -5,0 +5,0 @@ "author": {

Sorry, the diff of this file is too big to display

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