xstream-switch-last
1.0.0 • Public • Published xstream-switch-last
Transform a stream of stream to a stream by always taking value from the lastest one.
Marble diagram:
--+--------+---------------
\ \
\ ----1----2---3--
--a--b----c----d--------
flattenConcurrently
-----a--b------1----2---3--
const stream = xs.merge(
xs.of(xs.periodic(100)),
xs.of(1).compose(delay(350)).mapTo(xs.periodic(100).take(3).map(i => i + 10)),
)
.compose(switchLast);
Versions
Current Tags
- VersionDownloads (Last 7 Days)
- 1.0.0
0
Version History
- VersionDownloads (Last 7 Days)
- 1.0.0
0
Package Sidebar
Install
npm i xstream-switch-last
Weekly Downloads