Sockette
The cutest little WebSocket wrapper
Sockette is a tiny (367 bytes) wrapper around WebSocket that will automatically reconnect if the connection is lost. In addition to attaching additional API methods, Sockette allows you to reuse instances, avoiding the need to redeclare all event listeners. You have direct access to the (current) underlying WebSocket within every EventListener callback.