TylorS/stream-conversions
Convert between different stream implementations
{ "createdAt": "2016-01-09T16:47:37Z", "defaultBranch": "master", "description": "Convert between different stream implementations", "fullName": "TylorS/stream-conversions", "homepage": null, "language": "JavaScript", "name": "stream-conversions", "pushedAt": "2016-04-27T15:17:02Z", "stargazersCount": 31, "topics": [], "updatedAt": "2025-08-30T22:38:35Z", "url": "https://github.com/TylorS/stream-conversions"}Stream Conversions
Section titled “Stream Conversions”Convert between different stream implementations
Install
Section titled “Install”npm install stream-conversionsSupported Stream libraries
Section titled “Supported Stream libraries”- Most.js - aliased as most
- Rx 4 - aliased as rx
- Bacon.js - aliased as bacon
- Kefir.js - aliased as kefir
- xstream - aliased as xstream
fromLibrary. to. toLibrary (stream)
Section titled “fromLibrary. to. toLibrary (stream)”- Arguments :
- fromLibrary :: Object key - All supported library aliases
- toLibrary :: Object key - All supported library aliases
- stream :: fromLibrary type Stream - A stream of the fromLibrary type
- Returns : A stream of the toLibrary type
Examples
Section titled “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)) // 100convert.kefir.to.rx(Kefir.constant(100)).subscribe(x => console.log(x)) // 100How to add support for other libraries
Section titled “How to add support for other libraries”coming soon…