A WebSocket wrapper that adds reconnection, host failover/hunting, keep-alive, and automatic JSON serialization. Current stable version 0.0.25 is a beta-quality release with no recent updates. Unlike native WebSocket or simple wrappers, it provides built-in client-side failover across multiple hosts and automatic message queueing during reconnection. Supports browserify for bundling and has QUnit tests. Limited browser testing (Chrome, Safari).
npm install awesome-websocketNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an AwesomeWebSocket with failover hosts, auto-reconnect, keep-alive, and object sending.
Use new AwesomeWebSocket(url, [failoverUrls]) instead of just url.
Migrate to actively maintained libraries (e.g., reconnecting-websocket).
Wrap onmessage handler with JSON.parse(event.data) for object messages.
Monitor manually or implement custom rebalancing logic.
Create .d.ts file manually or use // @ts-ignore.
Ensure you use import AwesomeWebSocket from 'awesome-websocket' or use the browserified bundle at test/www/js/awesome-websocket.js.
Run npm install awesome-websocket and bundle with browserify.
Call send() only after onopen event fires.
No dependency data recorded yet.