# rx-socket

> Rx Subject for Node sockets

Latest version **0.5.0** (published 2019-02-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install rx-socket
pnpm add rx-socket
yarn add rx-socket
bun add rx-socket
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.0 |
| Published | 2019-02-13 |
| First published | 2017-11-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Mainframe |
| Maintainers | aclarke, diogoperillo, howleysv, mosic, paul_lecam, sarahwiley |

## Links

- npm: https://www.npmjs.com/package/rx-socket
- Repository: https://github.com/MainframeHQ/rx-socket
- Homepage: https://github.com/MainframeHQ/rx-socket#readme
- Issues: https://github.com/MainframeHQ/rx-socket/issues
- npm.io page: https://npm.io/package/rx-socket

## Dependencies (1)

- [oboe](https://npm.io/package/oboe.md) ^2.1.4

## Recent versions

- 0.5.0 (latest) — 2019-02-13
- 0.4.1 — 2018-10-26
- 0.4.0 — 2018-08-02
- 0.3.2 — 2018-08-01
- 0.3.1 — 2018-07-09
- 0.3.0 — 2018-04-25
- 0.2.0 — 2018-02-23
- 0.1.2 — 2018-02-05
- 0.1.1 — 2017-12-07
- 0.1.0 — 2017-11-16

## README

# rx-socket

[RxJS Subject](https://rxjs.dev/guide/subject) for
[Node Socket](https://nodejs.org/api/net.html#net_class_net_socket).

## Installation

```sh
yarn add rx-socket
```

## Usage

```js
import { SocketSubject } from 'rx-socket'

const socket = new SocketSubject('/path/to/socket')

socket.subscribe(data => {
  // `data` will be an Object, expecting a JSON-encoded string to be provided
  console.log(data)
})

// `next()` will encode the provided value to JSON
socket.next({ hello: 'world' })
```

See the
[`socket.connect()` documentation](https://nodejs.org/api/net.html#net_socket_connect)
for the supported `SocketSubject` constructor argument.

## License

MIT.\
See [LICENSE](LICENSE) file.

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