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

@farar/nodes

Package Overview
Dependencies
Maintainers
0
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@farar/nodes - npm Package Compare versions

Comparing version 0.5.2 to 0.5.3

55

dist/node.js

@@ -50,14 +50,7 @@ "use strict";

this._stream.once('error', (err) => {
try {
if (config_js_1.default.debug) {
this._errorHandler(err);
}
if (this._stream instanceof node_stream_1.Readable) {
this._stream.unpipe();
}
if (config_js_1.default.debug && this._errorHandler) {
this._errorHandler(err);
}
catch (err) {
if (this._errorHandler && err instanceof Error) {
this._errorHandler(err);
}
if (this._stream instanceof node_stream_1.Readable) {
this._stream.unpipe();
}

@@ -93,28 +86,18 @@ });

async _write(data, encoding) {
if (!this._stream.closed && this._stream instanceof node_stream_1.Writable) {
if (!this._stream.writableNeedDrain) {
if (this._queue.length === 0) {
if (this._stream.write(data, encoding ?? 'utf-8')) {
return;
}
else {
await (0, node_events_1.once)(this._stream, 'drain');
}
}
else {
this._queue.push(data);
this._size += !this._stream.writableObjectMode && (data instanceof Buffer || typeof data == 'string') ? data.length : 1;
}
while (this._queue.length) {
const data = this._queue.shift();
this._size -= !this._stream.writableObjectMode && (data instanceof Buffer || typeof data == 'string') ? data.length : 1;
if (!this._stream.write(data, encoding ?? 'utf-8')) {
await (0, node_events_1.once)(this._stream, 'drain');
}
}
if (this._stream.closed || !(this._stream instanceof node_stream_1.Writable))
return;
if (this._stream.writableNeedDrain) {
this._queue.push(data);
this._size += !this._stream.writableObjectMode && (data instanceof Buffer || typeof data == 'string') ? data.length : 1;
return;
}
if (this._stream.write(data, encoding ?? 'utf-8'))
return;
await (0, node_events_1.once)(this._stream, 'drain');
while (this._queue.length) {
const data = this._queue.shift();
this._size -= !this._stream.writableObjectMode && (data instanceof Buffer || typeof data == 'string') ? data.length : 1;
if (!this._stream.write(data, encoding ?? 'utf-8')) {
await (0, node_events_1.once)(this._stream, 'drain');
}
else {
this._queue.push(data);
this._size += !this._stream.writableObjectMode && (data instanceof Buffer || typeof data == 'string') ? data.length : 1;
}
}

@@ -121,0 +104,0 @@ }

{
"name": "@farar/nodes",
"version": "0.5.2",
"version": "0.5.3",
"description": "",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -57,3 +57,3 @@ # Nodes

- `options` `<NodeOptions>`
- `errorHandler` `<(err: Error, ...params: Array<unknown>) => void>` An optional error handler that will be used in the event of an internal Error.
- `errorHandler` `<(err: Error, ...params: Array<unknown>) => void>` An optional error handler that will be used in the event of an internal Error. **Default: `console.error`**

@@ -60,0 +60,0 @@ _public_ **node.connect(...nodes)**

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