2.0.1 • Published 5 years ago

web-socket-observable v2.0.1

Weekly downloads
-
License
GPL-3.0
Repository
-
Last release
5 years ago

webSocketObsevable

A simple wrapper around WebSocket, based on rxjs

warning:

from this release you can use the library as rxjs operator, not by creating an observable as before.

usage:

import {ws} from 'web-socket-observable';

const ws$ = interval(1000).pipe(
    map(x => `test ${x}`),
    ws(new WebSocket('wss://echo.websocket.org/'));

ws$.subscribe(x => {
    console.log(x);
})

// if you want "only listen" you can use NEVER observable, like follow:

const ws$ = NEVER.pipe(ws(new WebSocket('<ws server url>'));
2.0.1

5 years ago

2.0.0

5 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago