Repeats the observable sequence a specified number of times. If the repeat count is not specified, the sequence repeats indefinitely.
repeatCount
(Number
): Number of times to repeat the sequence. If not provided, repeats the sequence indefinitely.
(Observable
): The observable sequence producing the elements of the given sequence repeatedly.
var source = Rx.Observable.range(1, 3)
.repeat(2);
var subscription = source.subscribe(
function (x) {
console.log('Next: ' + x);
},
function (err) {
console.log('Error: ' + err);
},
function () {
console.log('Completed');
});
// => Next: 1
// => Next: 2
// => Next: 3
// => Next: 1
// => Next: 2
// => Next: 3
// => Completed
File:
Dist:
Prerequisites:
- None
NPM Packages:
NuGet Packages:
Unit Tests: