# rxjs-node-stream-subject

> RxJS Subject for Node.js streams and sockets

Latest version **0.2.0** (published 2016-05-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install rxjs-node-stream-subject
pnpm add rxjs-node-stream-subject
yarn add rxjs-node-stream-subject
bun add rxjs-node-stream-subject
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2016-05-05 |
| First published | 2016-05-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Damian Senn |
| Maintainers | topaxi |
| Keywords | node, stream, socket, rxjs, reactive |

## Links

- npm: https://www.npmjs.com/package/rxjs-node-stream-subject
- Repository: https://github.com/topaxi/rxjs-node-stream-subject
- Homepage: https://github.com/topaxi/rxjs-node-stream-subject#readme
- Issues: https://github.com/topaxi/rxjs-node-stream-subject/issues
- npm.io page: https://npm.io/package/rxjs-node-stream-subject

## Dependencies (2)

- [rxjs](https://npm.io/package/rxjs.md) ^5.0.0-beta.7
- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.6.1

## 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.2.0 (latest) — 2016-05-05
- 0.1.1 — 2016-05-04
- 0.1.0 — 2016-05-04

## README

# rxjs-node-stream-subject [![Build Status](https://travis-ci.org/topaxi/rxjs-node-stream-subject.svg?branch=master)](https://travis-ci.org/topaxi/rxjs-node-stream-subject) [![Test Coverage](https://codeclimate.com/github/topaxi/rxjs-node-stream-subject/badges/coverage.svg)](https://codeclimate.com/github/topaxi/rxjs-node-stream-subject/coverage) [![Code Climate](https://codeclimate.com/github/topaxi/rxjs-node-stream-subject/badges/gpa.svg)](https://codeclimate.com/github/topaxi/rxjs-node-stream-subject)

# Installation

```bash
$ npm install rxjs-node-stream-subject
```

## Usage
### StreamSubject
```javascript
var readline = require('readline')
var StreamSubject = require('rxjs-node-stream-subject')

var rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout
})

var s = new StreamSubject({
  dataEvent: 'line',
  endEvent: 'end',
  createStream: function() {
    return readline.createInterface({
      input: process.stdin,
      output: process.stdout
    })
  }
})

s.next('Write to stdout!\n')

// Map stin input
s.map(function(input) {
  return parseInt(input)
})
.forEach(function(integers) {
  // Do something with the entered integers!
})
```
### SocketSubject
```javascript
var SocketSubject = require('rxjs-node-stream-subject/dist/socket-subject').default

var s = new SocketSubject({
  host: 'topaxi.ch',
  port: 443,
  tls: true
})

s.next('GET / HTTP/1.1\r\n')
s.next('Host: topaxi.ch\r\n')
s.next('Connection: close\r\n')
s.next('\r\n')

s.subscribe(function(httpResponse) {
  console.log(httpResponse)
})
```

---

## [License](LICENSE)

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