rxio
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

rxio

A simple RxJS wrapper for Socket.IO

Basic example

The following example is taken from Socket.IO

import { fromSocketIOServer } from 'rxio';

const connection$ = fromSocketIOServer(3000);

connection$.subscribe(({ from, to }) => {
    to('hello').next('world');
    from('howdy').subscribe(console.log);
});
import { fromSocketIOClient } from 'rxio';

const { from, to } = fromSocketIOClient('ws://localhost:3000');

from('hello').subscribe(console.log);
to('howdy').next('stranger');

Disclaimer

This library is still in the early development phase, many functionalities are missing and the public API is not yet stable.

Package Sidebar

Install

npm i rxio

Weekly Downloads

0

Version

0.0.3

License

GPL-3.0-or-later

Unpacked Size

53.2 kB

Total Files

32

Last publish

Collaborators

  • samuelsh