extra-native-websocket (v0.5.2) is a lightweight, TypeScript-first library that wraps native WebSocket with a promise-based API, typed error handling, reconnection strategies, and state management. It extends an emitter pattern from @blackglory/structures, offering autoReconnect and exponential backoff without external dependencies. Requires Node >=22 and ESM-only. Differentiates from ws or isomorphic-ws by focusing on native WebSocket and providing extra utilities like autoReconnect and WebSocketError.
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
ESM-only since v0.1.0; CommonJS require will fail.
Available as named export since v0.3.0.
WebSocketError is re-exported from this package; do not import from extra-error directly.
TypeScript enum; use as type for setBinaryType.
TypeScript enum; returned by getState().
Creates an ExtraNativeWebSocket with reconnection, connects, sends and receives a message.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.