Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

MainframeOS/rx-socket

Open more actions menu

Repository files navigation

rx-socket

RxJS Subject for Node Socket.

Installation

yarn add rx-socket

Usage

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 for the supported SocketSubject constructor argument.

License

MIT.
See LICENSE file.

About

RxJS Subject for Node sockets

Resources

License

Stars

Watchers

Forks

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.