@mainframe/transport-ws-browser
v0.3.0
Published
WebSocket transport for browser
Downloads
53
Keywords
Readme
transport-ws-browser
WebSocket transport for browser as a RxJS Subject
.
Installation
yarn add @mainframe/transport-ws-browser
Usage
import wsTransport from '@mainframe/transport-ws-browser'
const transport = wsTransport('ws://localhost')
transport.subcribe(console.log)
transport.next({ hello: 'transport' })
API
wsTransport()
Arguments
url: string
Returns Rx.Subject<Object>
License
MIT