websocket-async

JSON →
library 1.3.0 ·javascript
verified Jun 7, 2026

An async/await WebSocket client for browsers. Version 1.3.0 provides a simple, promise-based interface for WebSocket connections using ES2017 async/await. The library wraps the native WebSocket API and offers methods like connect, send, receive, and disconnect. Unlike raw WebSocket, it queues incoming messages and allows asynchronous reading via receive() without event listeners. It supports reconnection and sends data synchronously while receiving asynchronously. The library is browser-only, has no dependencies, and is ESM-compatible.