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

smith

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smith - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

2

package.json

@@ -8,3 +8,3 @@ {

"description": "Smith is an RPC agent system for Node.JS used in architect and vfs.",
"version": "0.1.6",
"version": "0.1.7",
"scripts": {

@@ -11,0 +11,0 @@ "test": "./test-all.sh"

@@ -637,4 +637,52 @@ /*

exports.EngineIoTransport = EngineIoTransport;
inherits(EngineIoTransport, Transport);
function EngineIoTransport(socket) {
var self = this;
// Route errors from socket to transport.
socket.on("error", function (err) {
self.emit("error", err);
});
// Parse and route messages from socket to transport.
socket.on("message", function (json) {
var message;
try {
message = JSON.parse(json);
}
catch (err) {
self.emit("error", err);
return;
}
if (Array.isArray(message)) {
self.emit("message", message);
}
else {
self.emit("legacy", message);
}
});
// Route close events as disconnect events
socket.on("close", function (reason) {
self.emit("disconnect", reason);
});
// Encode and route send calls to socket.
this.send = function (message) {
var json;
try {
json = JSON.stringify(message);
}
catch (err) {
self.emit("error", err);
return;
}
return socket.send(json);
};
}
return exports;
});
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