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

reconnecting-websocket

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reconnecting-websocket - npm Package Compare versions

Comparing version 1.4.3 to 1.4.4

9

build/index.js
"use strict";
var isWebSocket = function (constructor) {
return constructor
&& constructor.prototype
&& constructor.prototype.CLOSING === 2;
return constructor && constructor.CLOSING === 2;
};
var isGlobalWebSocket = function () {
return typeof WebSocket !== 'undefined'
&& isWebSocket(WebSocket);
return typeof WebSocket !== 'undefined' && isWebSocket(WebSocket);
};

@@ -68,3 +65,3 @@ var getDefaultOptions = function () { return ({

if (!isWebSocket(config.constructor)) {
throw new TypeError('WebSocket constructor not set. Set `options.constructor`');
throw new TypeError('Invalid WebSocket constructor. Set `options.constructor`');
}

@@ -71,0 +68,0 @@ var log = config.debug ? function () {

@@ -12,9 +12,6 @@ type Options = {

const isWebSocket = constructor =>
constructor
&& constructor.prototype
&& constructor.prototype.CLOSING === 2;
constructor && constructor.CLOSING === 2;
const isGlobalWebSocket = () =>
typeof WebSocket !== 'undefined'
&& isWebSocket(WebSocket);
typeof WebSocket !== 'undefined' && isWebSocket(WebSocket);

@@ -87,3 +84,3 @@ const getDefaultOptions = () => <Options>({

if (!isWebSocket(config.constructor)) {
throw new TypeError('WebSocket constructor not set. Set `options.constructor`');
throw new TypeError('Invalid WebSocket constructor. Set `options.constructor`');
}

@@ -90,0 +87,0 @@

{
"name": "reconnecting-websocket",
"version": "1.4.3",
"version": "1.4.4",
"description": "Reconnecting WebSocket",

@@ -29,3 +29,3 @@ "main": "build/index.js",

"ava": "^0.15.2",
"html5-websocket": "^0.7.0",
"html5-websocket": "^1.0.0",
"nyc": "^6.6.1",

@@ -32,0 +32,0 @@ "opn-cli": "^3.1.0",

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