sxzz/unws

Unified WebSocket API for Node.js, Bun and modern browsers.

★ 32Forks 2JavaScriptGitHub ↗Compare

README

unws

npm version npm downloads Unit Test

Unified WebSocket API for Node.js, Bun and modern browsers.

Warning

For Node.js v20.10.0 and later, the WebSocket global object is directly accessible without requiring this package. As a result, this package is no longer maintained.

Install

npm i unws

Usage

import { WebSocket } from 'unws'

const ws = new WebSocket('ws://localhost:8080')

Sponsors

License

MIT License © 2023-PRESENT Kevin Deng

Contributors

renovate[bot]sxzzkearfyfzf404

Issues