# @libsql/isomorphic-ws

> Isomorphic WebSockets in Node, Bun, Deno and Cloudflare Workers

Latest version **0.1.5** (published 2023-09-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @libsql/isomorphic-ws
pnpm add @libsql/isomorphic-ws
yarn add @libsql/isomorphic-ws
bun add @libsql/isomorphic-ws
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2023-09-11 |
| First published | 2023-03-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 2.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | penberg |
| Keywords | ws, websocket, isomorphic, node, deno, workers |

## Links

- npm: https://www.npmjs.com/package/@libsql/isomorphic-ws
- Repository: https://github.com/libsql/isomorphic-ts
- Homepage: https://github.com/libsql/isomorphic-ts/tree/main/isomorphic-ws
- Issues: https://github.com/libsql/isomorphic-ts/issues
- npm.io page: https://npm.io/package/@libsql/isomorphic-ws

## Dependencies (2)

- [ws](https://npm.io/package/ws.md) ^8.13.0
- [@types/ws](https://npm.io/package/@types/ws.md) ^8.5.4

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.1.5 (latest) — 2023-09-11
- 0.1.3 — 2023-04-24
- 0.1.2 — 2023-04-24
- 0.1.0 — 2023-03-30
- 0.0.3 — 2023-03-30
- 0.0.2 — 2023-03-30
- 0.0.1 — 2023-03-30

## README

# `@libsql/isomorphic-ws`

This package provides `WebSocket` on Node (using `ws`) and in Deno and Cloudflare Workers (using the native `WebSocket`). Supports both CommonJS and ES modules.

```javascript
import { WebSocket } from "@libsql/isomorphic-ws";

const ws = new WebSocket("ws://localhost:8080");
ws.onopen = (event) => {
    ws.send("Hello");
};
ws.onmessage = (event) => {
    console.log(event.data);
    ws.close();
};
```

---
_Source: https://npm.io/package/@libsql/isomorphic-ws · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
