A pure-JavaScript WebSocket protocol 13 (RFC 6455) implementation for Node.js with no native or heavy dependencies. Current stable version is 4.1.0, released with moderate cadence. It supports both client and server modes, requires Node.js >=12.22.0. Key differentiator: zero native dependencies, lightweight, and compatible with the standard WebSocket API subset. Not suitable for browsers (Node-only).
npm install websocket13No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a WebSocket client connection to a server, sends a message, logs received data, and closes.
Use syntax: new WebSocket(url, [], { headers: {...} })Check if data is Buffer or String and decode accordingly.
Replace 'WebSocketClient' with 'WebSocket'.
Implement reconnection logic with exponential backoff.
Use 'ws' or native WebSocket for browser code.
Use import { WebSocket } from 'websocket13'Ensure WebSocket server is running and URL is correct (ws:// or wss://).
No dependency data recorded yet.