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

@graphy/core.iso.stream

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphy/core.iso.stream - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

68

main.js

@@ -396,37 +396,43 @@ const stream = require('stream');

// node.js
if(b_is_node) {
// patch for node < v10
if((+(/^v(\d+)/.exec(process.version)[1])) < 10) {
// override destroy methods
Transform.prototype.destroy = Duplex.prototype.destroy = function(e_destroy, fke_destroy) {
this._readableState.destroyed = true;
this._writableState.destroyed = true;
// deduce the runtime environment
const [B_BROWSER, B_BROWSERIFY] = (() => 'undefined' === typeof process
? [true, false]
: (process.browser
? [true, true]
: ('undefined' === process.versions || 'undefined' === process.versions.node
? [true, false]
: [false, false])))();
let f_emit_close = () => {
if(!this._writableState.emitClose) return;
if(!this._readableState.emitClose) return;
this.emit('close');
};
// node.js or browserify; patch for node < v10
if(B_BROWSERIFY || (b_is_node && (+(/^v(\d+)/.exec(process.version)[1])) < 10)) {
// override destroy methods
Transform.prototype.destroy = Duplex.prototype.destroy = function(e_destroy, fke_destroy) {
this._readableState.destroyed = true;
this._writableState.destroyed = true;
this._destroy(e_destroy || null, (e_destroy_re) => {
if(!fke_destroy && e_destroy_re) {
process.nextTick(() => {
this.emit('error', e_destroy_re);
f_emit_close();
});
this._writableState.errorEmitted = true;
}
else {
process.nextTick(f_emit_close);
if(fke_destroy) fke_destroy(e_destroy_re);
}
});
return this;
let f_emit_close = () => {
if(!this._writableState.emitClose) return;
if(!this._readableState.emitClose) return;
this.emit('close');
};
// override default _destroy implementations
Transform.prototype._destroy = Duplex.prototype._destroy = (e_destroy, fke_destroy) => fke_destroy(e_destroy);
}
this._destroy(e_destroy || null, (e_destroy_re) => {
if(!fke_destroy && e_destroy_re) {
process.nextTick(() => {
this.emit('error', e_destroy_re);
f_emit_close();
});
this._writableState.errorEmitted = true;
}
else {
process.nextTick(f_emit_close);
if(fke_destroy) fke_destroy(e_destroy_re);
}
});
return this;
};
// override default _destroy implementations
Transform.prototype._destroy = Duplex.prototype._destroy = (e_destroy, fke_destroy) => fke_destroy(e_destroy);
}

@@ -433,0 +439,0 @@

{
"name": "@graphy/core.iso.stream",
"version": "3.1.0",
"version": "3.1.1",
"description": "Provides isomorphic stream interface for node.js / browser and adds `.until`, a promisified version of the `.on` event listener",

@@ -29,2 +29,2 @@ "keywords": [

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