RxJS implements the skipUntil
operator. You can pass it either an Observable or a Promise
that it will monitor for an item that triggers skipUntil
to begin mirroring the source Observable.
var source = Rx.Observable.timer(0, 1000) .skipUntil(Rx.Observable.timer(5000)); var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { console.log('Error: ' + err); }, function () { console.log('Completed'); });
Next: 6 Next: 7 Next: 8 Completed
skipUntil
is found in each of the following distributions:
rx.js
rx.all.js
rx.all.compat.js
rx.compat.js
rx.lite.js
rx.lite.compat.js
There is also a skipUntilWithTime
operator to which you can pass an absolute time or an initial duration in place of an Observable, but this is described on the Skip operator page.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4