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 3.0.3 to 3.0.4

.eslintrc.yml

11

dist/index.js

@@ -15,3 +15,3 @@ "use strict";

maxRetries: Infinity,
debug: false,
debug: false
}); };

@@ -23,3 +23,3 @@ var bypassProperty = function (src, dst, name) {

enumerable: true,
configurable: true,
configurable: true
});

@@ -73,3 +73,3 @@ };

for (var _i = 0; _i < arguments.length; _i++) {
params[_i - 0] = arguments[_i];
params[_i] = arguments[_i];
}

@@ -115,2 +115,5 @@ return console.log.apply(console, ['RWS:'].concat(params));

var connect = function () {
if (!shouldRetry) {
return;
}
log('connect');

@@ -159,3 +162,3 @@ var oldWs = ws;

reason: reason,
wasClean: true,
wasClean: true
};

@@ -162,0 +165,0 @@ // execute close listeners soon with a fake closeEvent

@@ -0,1 +1,7 @@

/*!
* Reconnecting WebSocket
* by Pedro Ladaria <pedro.ladaria@gmail.com>
* https://github.com/pladaria/reconnecting-websocket
* License MIT
*/
type Options = {

@@ -125,2 +131,6 @@ constructor?: new(url: string, protocols?: string | string[]) => WebSocket;

const connect = () => {
if (!shouldRetry) {
return;
}
log('connect');

@@ -184,2 +194,3 @@ const oldWs = ws;

ws.removeEventListener('close', handleClose);
// run and remove level2

@@ -192,2 +203,3 @@ if (Array.isArray(listeners.close)) {

}
// run and remove level0

@@ -194,0 +206,0 @@ if (ws.onclose) {

{
"name": "reconnecting-websocket",
"version": "3.0.3",
"version": "3.0.4",
"description": "Reconnecting WebSocket",

@@ -8,8 +8,8 @@ "main": "dist/index.js",

"scripts": {
"build": "tsc",
"pretest": "npm run build",
"test": "nyc ava --verbose --serial test/test.js",
"build": "tsc index.ts --outDir dist",
"build-amd": "tsc index.ts -m AMD --outFile ./dist/reconnecting-websocket.amd.js",
"test": "nyc --reporter=text-summary --reporter=lcov ava --verbose --serial test/test.js",
"prebuild": "rimraf dist",
"report": "nyc report --reporter=html && opn coverage/index.html",
"prepublish": "npm test"
"prepublish": "npm run build && npm run build-amd && npm test"
},

@@ -30,9 +30,11 @@ "keywords": [

"devDependencies": {
"ava": "^0.15.2",
"ava": "^0.19.1",
"coveralls": "^2.13.1",
"eslint": "^3.19.0",
"html5-websocket": "^1.0.0",
"nyc": "^6.6.1",
"nyc": "^10.3.2",
"opn-cli": "^3.1.0",
"rimraf": "^2.5.4",
"typescript": "1.8.10",
"ws": "^1.1.1"
"typescript": "^2.3.2",
"ws": "^3.0.0"
},

@@ -39,0 +41,0 @@ "dependencies": {},

@@ -17,3 +17,4 @@ # Reconnecting WebSocket

- Debug mode
- Fast close (new in version 3).
- Fast close (new in version 3)
- AMD build available (see dist folder)

@@ -20,0 +21,0 @@ ## Install

@@ -8,8 +8,10 @@ {

"outDir": "dist",
"declaration": true
"declaration": true,
"moduleResolution": "node"
},
"exclude": [
"node_modules",
"dist"
"dist",
"test"
]
}

Sorry, the diff of this file is not supported yet

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