rx-socket
Rx Subject for Node sockets
Last updated 2 years ago by paul_lecam .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install rx-socket 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 0.5.0                                ...           latest (2 years ago)

10 Versions

  • 0.5.0                                ...           2 years ago
  • 0.4.1                                ...           2 years ago
  • 0.4.0                                ...           2 years ago
  • 0.3.2                                ...           2 years ago
  • 0.3.1                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.2                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 2
Dependencies (1)
Dev Dependencies (16)

Copyright 2014 - 2016 © taobao.org |