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

ether-stream

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ether-stream - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

2

package.json

@@ -12,3 +12,3 @@ {

],
"version": "0.2.0",
"version": "0.2.1",
"author": "Ben Kelly <ben@wanderview.com>",

@@ -15,0 +15,0 @@ "license": "BSD",

@@ -55,13 +55,18 @@ // Copyright (c) 2013, Benjamin J. Kelly ("Author")

EtherStream.prototype._transform = function(msg, output, callback) {
var data = (msg instanceof Buffer) ? msg : msg.data;
var offset = (msg instanceof Buffer) ? 0 : ~~msg.offset;
EtherStream.prototype._transform = function(origMsg, output, callback) {
var msg = origMsg;
if (msg instanceof Buffer) {
msg = { data: msg, offset: 0 };
}
msg.offset = ~~msg.offset;
try {
var frame = new EtherFrame(data, offset);
output({ ether: frame, data: data, offset: offset + frame.length });
var frame = new EtherFrame(msg.data, msg.offset);
msg.ether = frame;
msg.offset += frame.length;
output(msg);
} catch (error) {
this.emit('ignored', msg);
this.emit('ignored', origMsg);
}
callback();
};
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