A lightweight WebSocket library for JavaScript environments, targeting Bare and Node.js. Version 3.0.0 provides both client and server WebSocket functionality with a simple stream-like API. It is actively maintained by Holepunch and offers TypeScript support. Compared to alternatives like ws, bare-ws is optimized for Bare runtime and has minimal dependencies.
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
ESM default import is preferred, but CJS require also works.
Named import works in both ESM and CJS.
Named export exists; avoid destructuring from default export.
Creates a WebSocket server and client, sending and receiving messages.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.