cycle-convert
🌗 Utility for converting cycle.js dataflows between stream libs.
What?
This really very very simple. It uses @cycle
stream lib adapters
for converting input and output streams in passed dataflow.
... const RxDataflow = // plug it in your cycle Rx app!
It will (at least it should, see cautions) properly convert all driver sources with all their (custom) methods/helpers and stuff.
You may also convert just streams:
let rxStream$ =
Why you may need it?
Well, for example if you want to migrate incrementally
from rxjs
to xstream
(or maybe visa versa?, don't tell @staltz)
Or you may use some cyclic component created with one stream library inside your other component created using another lib. It is simple.
Cautions
cycle-convert
supports traversal of streams - this means it can
also convert nested streams hide inside. This may be needed for some driver
sinks for example official @cycle/DOM
driver with transposition
option.
To enable stream traversal use traverse
option.
const RxComponent = // drop it to your cycle Rx app!
Install
npm install cycle-convert -S
Licence
WTF?