WebSocket message queue for managing and queuing socket messages with TypeScript support. Current stable version is 1.1.8. It provides a simple API to enqueue, dequeue, and process WebSocket messages in order, preventing message loss during reconnection. Lightweight with no external dependencies, it is designed for real-time applications requiring reliable message delivery over WebSockets in both Node.js and browser environments.
npm install ws-socket-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a WebSocket message queue, connects to a server, and enqueues a message.
Use 'url' instead of 'wsUrl' in constructor options.
Provide a callback function as second argument to enqueue.
Always call connect() after enqueuing initial messages.
Use TypeScript or validate messages before enqueueing.
Upgrade Node.js to 18+ or stay on v1.x for older Node.js.
Ensure you call queue.connect() and wait for 'open' event before sending.
Run 'npm install ws-socket-queue' and use import syntax.
Use import { Queue } from 'ws-socket-queue' instead of import Queue from 'ws-socket-queue'.No dependency data recorded yet.