@borodindmitriy/base-code
Advanced tools
@@ -15,3 +15,3 @@ import { EventEmitter } from "../isomorphic/EventEmitter"; | ||
| private headrBeatInterval; | ||
| constructor(path?: string, TLS?: boolean, pingPongDelay?: number, reconnectionDelay?: number); | ||
| constructor(host?: string, path?: string, TLS?: boolean, pingPongDelay?: number, reconnectionDelay?: number); | ||
| readonly isOpen: boolean; | ||
@@ -18,0 +18,0 @@ setUserID(uid: string): void; |
@@ -10,3 +10,3 @@ "use strict"; | ||
| class WSClient extends EventEmitter_1.EventEmitter { | ||
| constructor(path = "ws", TLS = true, pingPongDelay = 1000, reconnectionDelay = 5000) { | ||
| constructor(host = window.location.host, path = "ws", TLS = true, pingPongDelay = 1000, reconnectionDelay = 5000) { | ||
| super(); | ||
@@ -17,3 +17,3 @@ this.readyState = WebSocket.CLOSED; | ||
| this.uid = ""; | ||
| this.path = `${TLS ? "wss" : "ws"}://${window.location.host}/${path}`; | ||
| this.path = `${TLS ? "wss" : "ws"}://${host}/${path}`; | ||
| // IS_ALIVE | ||
@@ -20,0 +20,0 @@ this.pingPongDelay = pingPongDelay; |
+1
-1
| { | ||
| "name": "@borodindmitriy/base-code", | ||
| "description": "Common classes's library.", | ||
| "version": "4.0.4", | ||
| "version": "4.0.5", | ||
| "engines": { | ||
@@ -6,0 +6,0 @@ "node": ">=8", |
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 8 instances in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 8 instances in 1 package
174290
0.02%