New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

asset-pipe-js-reader

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asset-pipe-js-reader - npm Package Compare versions

Comparing version 1.0.0-beta.3 to 1.0.0-beta.4

29

lib/reader.js

@@ -43,23 +43,29 @@ 'use strict';

const merged = mergeStream();
let count = 0;
streams.forEach((strm) => {
strm.on('error', (error) => {
this.emit('error', error);
});
strm.on('file found', (file) => {
this.emit('file found', file);
merged.add(strm.pipe(JSONStream.parse('*')));
count++;
if (count === streams.length) {
if (merged.isEmpty()) {
this.emit('pipeline empty');
} else {
this.emit('pipeline ready');
}
}
});
strm.on('file not found', (file) => {
this.emit('file not found', file);
count++;
if (count === streams.length) {
if (merged.isEmpty()) {
this.emit('pipeline empty');
} else {
this.emit('pipeline ready');
}
}
});
});
// If the merged file stream yelded empty, we can not continue
setImmediate(() => {
if (merged.isEmpty()) {
return this.emit('pipeline empty');
}
this.emit('pipeline ready');
});
// Set up the pipeline

@@ -81,3 +87,4 @@ const order = new Order();

.pipe(this);
}
};
{
"name": "asset-pipe-js-reader",
"version": "1.0.0-beta.3",
"version": "1.0.0-beta.4",
"author": {

@@ -5,0 +5,0 @@ "name": "Trygve Lie",

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