isomorphic-ws

JSON →
library 5.0.0 ·javascript
verified Jun 7, 2026

Isomorphic WebSocket wrapper that uses the ws library on Node.js and the native WebSocket API in browsers. Version 5.0.0 is the latest stable release, published July 2021. Requires ws as a peer dependency. The API matches the browser WebSocket standard but has notable differences from ws's Node interface (e.g., no Server class, no options constructor argument). Provides TypeScript type declarations. Lightweight and straightforward, but developers must test cross-environment behavior. Active maintenance with infrequent releases.