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

engine.io-client

Package Overview
Dependencies
Maintainers
2
Versions
159
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

engine.io-client - npm Package Compare versions

Comparing version 3.3.1 to 3.3.2

23

lib/transports/websocket.js

@@ -11,9 +11,13 @@ /**

var debug = require('debug')('engine.io-client:websocket');
var BrowserWebSocket, NodeWebSocket;
if (typeof self === 'undefined') {
if (typeof WebSocket !== 'undefined') {
BrowserWebSocket = WebSocket;
} else if (typeof self !== 'undefined') {
BrowserWebSocket = self.WebSocket || self.MozWebSocket;
} else {
try {
NodeWebSocket = require('ws');
} catch (e) { }
} else {
BrowserWebSocket = self.WebSocket || self.MozWebSocket;
}

@@ -27,3 +31,3 @@

var WebSocket = BrowserWebSocket || NodeWebSocket;
var WebSocketImpl = BrowserWebSocket || NodeWebSocket;

@@ -52,3 +56,3 @@ /**

if (!this.usingBrowserWebSocket) {
WebSocket = NodeWebSocket;
WebSocketImpl = NodeWebSocket;
}

@@ -113,3 +117,8 @@ Transport.call(this, opts);

try {
this.ws = this.usingBrowserWebSocket && !this.isReactNative ? (protocols ? new WebSocket(uri, protocols) : new WebSocket(uri)) : new WebSocket(uri, protocols, opts);
this.ws =
this.usingBrowserWebSocket && !this.isReactNative
? protocols
? new WebSocketImpl(uri, protocols)
: new WebSocketImpl(uri)
: new WebSocketImpl(uri, protocols, opts);
} catch (err) {

@@ -287,3 +296,3 @@ return this.emit('error', err);

WS.prototype.check = function () {
return !!WebSocket && !('__initialize' in WebSocket && this.name === WS.prototype.name);
return !!WebSocketImpl && !('__initialize' in WebSocketImpl && this.name === WS.prototype.name);
};

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "3.3.1",
"version": "3.3.2",
"main": "lib/index.js",

@@ -8,0 +8,0 @@ "homepage": "https://github.com/socketio/engine.io-client",

Sorry, the diff of this file is too big to display

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