{"library":"reconnecting-websocket","type":"library","category":null,"description":"A minimal, dependency-free WebSocket wrapper that automatically reconnects when the connection is closed. Current stable version is 4.4.0, with frequent releases. It implements the standard WebSocket API (both Level0 and Level2 event models), supports custom WebSocket constructors (e.g., the 'ws' library in Node.js), URL providers (sync or async) for dynamic endpoints, connection timeout, exponential backoff with jitter, and message buffering until reconnection. It is designed for multi-platform use (browser, Service Workers, Node.js, React Native) and ships with TypeScript definitions. Unlike alternatives, it has zero dependencies and does not rely on any DOM or EventEmitter libraries.","language":"javascript","status":"active","version":"4.4.0","tags":["javascript","websocket","client","reconnecting","reconnection","reconnect","forever","persistent","typescript"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install reconnecting-websocket","imports":["import ReconnectingWebSocket from 'reconnecting-websocket'","import ReconnectingWebSocket from 'reconnecting-websocket'","import type { Options } from 'reconnecting-websocket'"]},{"cmd":"yarn add reconnecting-websocket","imports":[]},{"cmd":"pnpm add reconnecting-websocket","imports":[]}],"homepage":"https://github.com/pladaria/reconnecting-websocket#readme","github":"https://github.com/pladaria/reconnecting-websocket","docs":null,"changelog":null,"pypi":null,"npm":"reconnecting-websocket","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}