A lightweight TypeScript library simplifying WebSocket connections with built-in heartbeat keep-alive and automatic reconnection. Current stable version is 0.4.10, released as an npm package. Key differentiators: minimal API surface, heartbeat detection, automatic reconnection when network is restored (online reconnection), and configurable retry intervals. Suitable for real-time applications needing reliable WebSocket connections. Release cadence is ad-hoc; primarily maintained by a single contributor.
npm install easy-websocket-cNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows instantiation with options, opening a connection, event handlers, sending a message, and closing.
Use 'autoContect' as the property name exactly as documented.
Only set forceOpen to true when you intend to forcefully replace an existing connection.
Use 'open' with desired URL to change the endpoint; 'reopen' only reuses previous settings.
Use 'onClose' to listen for close events rather than relying on a returned promise.
Use named import: import { EasyWebSocketC } from 'easy-websocket-c'Ensure 'types' field in tsconfig or 'types' property in package.json is correctly set, or install @types/easy-websocket-c if separate (not needed).
Change your option property name from 'autoConnect' to 'autoContect' to match the library's exported type.
No dependency data recorded yet.