Registry / messaging / frozor-websocket

frozor-websocket

JSON →
library1.1.3jsnpmunverified

A WebSocket client with automatic reconnection, event emission, and logging. Version 1.1.3 appears to be the latest stable release (no recent updates). This library provides a reconnecting WebSocket with built-in event handling and logging, similar to libraries like reconnecting-websocket but with a simpler API. It is suitable for projects needing persistent WebSocket connections without managing reconnection logic manually.

npm install frozor-websocket
INSTALL
IMPORT
SIG · FROZOR-WEBSOCKET
F
frozor-websocket
messagingjavascriptv1.1.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WebSocket
import WebSocket from 'frozor-websocket'
import { WebSocket } from 'frozor-websocket'
Default export is the WebSocket class. Named import will fail.
WebSocket
const WebSocket = require('frozor-websocket')
CommonJS require works as the default export.

Creates a reconnecting WebSocket, listens for events, and sends a message.

import WebSocket from 'frozor-websocket'; const ws = new WebSocket('wss://echo.websocket.org'); ws.on('open', () => { console.log('Connected'); ws.send('Hello World'); }); ws.on('message', (data) => { console.log('Received:', data); }); ws.on('close', (code, reason) => { console.log('Disconnected:', code, reason); }); ws.on('error', (err) => { console.error('WebSocket error:', err); });
Debug
Known issues
gotchaThe module does not export a named 'WebSocket' symbol; it must be imported as default.
fix
Use import WebSocket from 'frozor-websocket' instead of import { WebSocket } from 'frozor-websocket'.
affects: >=1.0.0
gotchaThe library might not handle all WebSocket close codes gracefully; check reconnection behavior.
fix
Handle close events manually to ensure proper reconnection.
affects: <2.0.0
Errors
Common errors & fixes
TypeError: WebSocket is not a constructor
Using named import instead of default import.
fix
import WebSocket from 'frozor-websocket'
Cannot find module 'frozor-websocket'
Package not installed or misspelled.
fix
npm install frozor-websocket
Upgrade
Version history
1.1.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
18
OpenAI (training)
1
Resources
frozor-websocket — npm install frozor-websocket · libregistry