0.5.0 • Published 5 years ago

rx-socket v0.5.0

Weekly downloads
9
License
MIT
Repository
github
Last release
5 years ago

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.

0.5.0

5 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago