TylorS / stream-conversions

Convert between different stream implementations
MIT License
31 stars 2 forks source link

Stream Conversions

Convert between different stream implementations

Install

npm install stream-conversions

Supported Stream libraries

API

fromLibrary. to. toLibrary (stream)

Examples

import convert from 'stream-conversions'

import most from 'most'
import Rx from 'rx'
import Bacon from 'baconjs'
import kefir from 'kefir'

convert.most.to.rx(most.just(100)).subscribe(x => console.log(x)) // 100

convert.rx.to.bacon(Rx.Observable.just(100)).onValue(x => console.log(x)) // 100

convert.bacon.to.most(Bacon.once(100)).observe(x => console.log(x)) // 100

convert.kefir.to.kefir(Kefir.constant(100)).onValue(x => console.log(x)) // 100
convert.kefir.to.rx(Kefir.constant(100)).subscribe(x => console.log(x)) // 100

How to add support for other libraries

coming soon...