{"library":"maxsocket","type":"library","category":null,"description":"maxsocket is a lightweight (~0.9 kB min+gzip) WebSocket client library offering built-in auto-reconnect, offline message queuing, JSON handling, and event routing. Current stable version is 1.0.2. It provides a functional API with explicit lifecycle handlers (onConnect, onMessage, onClose) instead of generic event listeners, and includes an event routing system for structured server messages. Unlike alternatives like reconnecting-websocket (2.6 kB) and simple-websocket (13.8 kB), maxsocket focuses on small bundle size, simplicity for modern frontends (React, Vue, Svelte, vanilla JS), and built-in features that reduce boilerplate. It is ESM-only and uses the native browser WebSocket API.","language":"javascript","status":"active","version":"1.0.2","tags":["javascript","websocket","simple-websocket","reconnecting-websocket","react","vue","svelte","vanilla-js"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install maxsocket","imports":["import { connect } from 'maxsocket'","import type { MaxSocket } from 'maxsocket'","import type { MaxSocketOptions } from 'maxsocket'"]},{"cmd":"yarn add maxsocket","imports":[]},{"cmd":"pnpm add maxsocket","imports":[]}],"homepage":"https://github.com/max-matinpalo/maxsocket#readme","github":"https://github.com/max-matinpalo/maxsocket","docs":null,"changelog":null,"pypi":null,"npm":"maxsocket","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}