pulsews
v1.0.1
Published
PulseWS — A robust, easy-to-use WebSocket SDK for real-time apps.
Downloads
227
Maintainers
Readme
PulseWS
PulseWS is a lightweight, robust, and reusable WebSocket SDK for modern web apps. It simplifies working with WebSockets by providing automatic reconnections, event-based messaging, heartbeats, and token-based authentication — all in a type-safe, easy-to-use API.
🚀 Features
- Auto-reconnect with exponential backoff
- Event-driven message handling (
on/emit) - Optional authentication via token query params
- JSON serialization & type safety
- Works in React, Vue, Node.js, and vanilla JS apps
- Extensible for custom events or channels
- Optional heartbeat/ping to keep connections alive
💻 Installation
# Using npm
npm install pulsews
# Using yarn
yarn add pulsews