Socket
Socket
Sign inDemoInstall

final-stream

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

final-stream - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

20

index.js

@@ -12,2 +12,11 @@ const { promisify } = require('util');

let finished = false;
function finish () {
if (finished) {
return;
}
finished = true;
callback(null, Buffer.concat(body));
}
stream

@@ -17,7 +26,10 @@ .on('data', function (chunk) {

})
.on('close', function () {
callback(null, Buffer.concat(body));
})
.on('destroy', finish)
.on('end', finish)
.on('close', finish)
.on('error', function (error) {
if (finished) {
console.log(error);
return;
}
callback(error);

@@ -24,0 +36,0 @@ });

2

package.json
{
"name": "final-stream",
"version": "2.0.1",
"version": "2.0.2",
"description": "A tool to read a full stream and callback once finished with the data",

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