This is RxJS v 4. Find the latest version here
Returns the values from the source observable sequence until the other observable sequence or Promise produces a value.
other
(Observable
|Promise
): Observable sequence or Promise that terminates propagation of elements of the source sequence.
(Observable
): An observable sequence containing the elements of the source sequence up to the point the other sequence or Promise interrupted further propagation.
var source = Rx.Observable.timer(0, 1000)
.takeUntil(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: 0
// => Next: 1
// => Next: 2
// => Next: 3
// => Next: 4
// => Completed
File:
Dist:
Prerequisites:
- None
NPM Packages:
NuGet Packages:
Unit Tests: