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

aconnector

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aconnector - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

56

index.js

@@ -5,3 +5,2 @@ const net = require("net");

module.exports.ConnectorClient = class ConnectorClient extends EventEmitter {
constructor(key) {

@@ -67,34 +66,31 @@ super();

return await new Promise((resolve, reject) => {
this._requests[_ID] = (data) => {
try {
if (data.success) {
if (typeof success == "function")
return resolve(success(data.data));
return resolve(data.data);
}
let e = data.error;
if (typeof error == "object") {
if (typeof error[e.code] == "function")
return resolve(error[e.code](e.data, e));
i f (typeof error["default"] == "function")
return resolve(error["default"](e.code, e.data, e));
} else if (typeof error == "function") {
return resolve(error(e.code, e.data, e));
}
return reject(e);
this._requests[_ID] = (data) => {
try {
if (data.success) {
if (typeof success == "function")
return resolve(success(data.data));
return resolve(data.data);
}
catch
(e) {
return reject(e);
let e = data.error;
if (typeof error == "object") {
if (typeof error[e.code] == "function")
return resolve(error[e.code](e.data, e));
if (typeof error["default"] == "function")
return resolve(error["default"](e.code, e.data, e));
} else if (typeof error == "function") {
return resolve(error(e.code, e.data, e));
}
};
setTimeout(() => {
reject("__TIMEOUT__");
}, timeout | 5000);
}
)
;
return reject(e);
}
catch
(e) {
return reject(e);
}
};
setTimeout(() => {
reject("__TIMEOUT__");
}, timeout | 5000);
});
}
}
;
};

@@ -101,0 +97,0 @@ module.exports.ConnectorServer = class ConnectorServer extends EventEmitter {

{
"name": "aconnector",
"version": "0.0.2",
"version": "0.0.3",
"description": "",

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

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