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

get-stream

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-stream - npm Package Compare versions

Comparing version 2.2.1 to 2.3.0

10

index.js

@@ -18,2 +18,3 @@ 'use strict';

stream = bufferStream(opts);
inputStream.once('error', error);
inputStream.pipe(stream);

@@ -26,3 +27,3 @@

});
stream.on('error', reject);
stream.once('error', error);
stream.on('end', resolve);

@@ -33,2 +34,9 @@

};
function error(err) {
if (err) { // null check
err.bufferedData = stream.getBufferedValue();
}
reject(err);
}
});

@@ -35,0 +43,0 @@

2

package.json
{
"name": "get-stream",
"version": "2.2.1",
"version": "2.3.0",
"description": "Get a stream as a string, buffer, or array",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -90,2 +90,13 @@ # get-stream [![Build Status](https://travis-ci.org/sindresorhus/get-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stream)

## Errors
If the input stream emits an `error` event, the promise will be rejected with the error. The buffered data will be attached to the `bufferedData` property of the error.
```js
getStream(streamThatErrorsAtTheEnd('unicorn'))
.catch(err => console.log(err.bufferedData));
// unicorn
```
## FAQ

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