Socket
Socket
Sign inDemoInstall

websocket-ts

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

websocket-ts - npm Package Compare versions

Comparing version 2.1.4 to 2.1.5

5

dist/cjs/src/websocket.js

@@ -407,2 +407,3 @@ "use strict";

}
// handler dispatches the retry event to all listeners of the retry event-type
var handleRetryEvent = function (detail) {

@@ -423,3 +424,3 @@ var event = new CustomEvent(websocket_event_1.WebsocketEvent.retry, { detail: detail });

retryEventDetail.retries <= this._options.retry.maxRetries) {
this.retryTimeout = window.setTimeout(function () { return handleRetryEvent(retryEventDetail); }, retryEventDetail.backoff);
this.retryTimeout = globalThis.setTimeout(function () { return handleRetryEvent(retryEventDetail); }, retryEventDetail.backoff);
}

@@ -431,3 +432,3 @@ };

Websocket.prototype.cancelScheduledConnectionRetry = function () {
window.clearTimeout(this.retryTimeout);
globalThis.clearTimeout(this.retryTimeout);
};

@@ -434,0 +435,0 @@ return Websocket;

@@ -331,2 +331,3 @@ import { WebsocketEvent, } from "./websocket_event";

}
// handler dispatches the retry event to all listeners of the retry event-type
const handleRetryEvent = (detail) => {

@@ -347,3 +348,3 @@ const event = new CustomEvent(WebsocketEvent.retry, { detail });

retryEventDetail.retries <= this._options.retry.maxRetries) {
this.retryTimeout = window.setTimeout(() => handleRetryEvent(retryEventDetail), retryEventDetail.backoff);
this.retryTimeout = globalThis.setTimeout(() => handleRetryEvent(retryEventDetail), retryEventDetail.backoff);
}

@@ -355,5 +356,5 @@ }

cancelScheduledConnectionRetry() {
window.clearTimeout(this.retryTimeout);
globalThis.clearTimeout(this.retryTimeout);
}
}
//# sourceMappingURL=websocket.js.map

2

package.json
{
"name": "websocket-ts",
"version": "2.1.4",
"version": "2.1.5",
"main": "dist/cjs/src/index.js",

@@ -5,0 +5,0 @@ "types": "dist/cjs/src/index.d.ts",

@@ -25,3 +25,3 @@ import { Backoff } from "./backoff/backoff";

private _underlyingWebsocket: WebSocket; // the underlying websocket, e.g. native browser websocket
private retryTimeout?: number; // timeout for the next retry, if any
private retryTimeout?: ReturnType<typeof globalThis.setTimeout>; // timeout for the next retry, if any

@@ -451,2 +451,3 @@ private _options: WebsocketOptions &

// handler dispatches the retry event to all listeners of the retry event-type
const handleRetryEvent = (detail: RetryEventDetail) => {

@@ -476,3 +477,3 @@ const event: CustomEvent<RetryEventDetail> = new CustomEvent(

) {
this.retryTimeout = window.setTimeout(
this.retryTimeout = globalThis.setTimeout(
() => handleRetryEvent(retryEventDetail),

@@ -488,4 +489,4 @@ retryEventDetail.backoff,

private cancelScheduledConnectionRetry() {
window.clearTimeout(this.retryTimeout);
globalThis.clearTimeout(this.retryTimeout);
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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