# ws-json-client

> Simple WS JSON client

Latest version **0.2.0** (published 2019-07-04) · 0 weekly downloads

## Install

```sh
npm install ws-json-client
pnpm add ws-json-client
yarn add ws-json-client
bun add ws-json-client
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2019-07-04 |
| First published | 2019-07-04 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Anton Kosykh |
| Maintainers | kelin2025 |

## Links

- npm: https://www.npmjs.com/package/ws-json-client
- npm.io page: https://npm.io/package/ws-json-client

## Dependencies (1)

- [effector](https://npm.io/package/effector.md) ^19.1.0

## Recent versions

- 0.2.0 (latest) — 2019-07-04
- 0.1.0 — 2019-07-04

## README

# WS JSON client

Simple WS with some helpers

## Installation

```bash
npm install ws-json-client
```

## Usage

```js
import { makeSocket, createSocketEventFactory } from "ws-json-client"

const socket = makeSocket("ws://localhost:8080")
const createSocketEvent = createSocketEventFactory(socket)

// Will trigger on data with { action: "users.received", payload: ... }
// with data.payload
const usersReceived = createSocketEvent("users.received")
usersReceived.watch(console.log)

// Will send JSON.stringify({ action: "action", payload: { foo: "bar" } })
socket.sendAction("action", { foo: "bar" })
```

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