Rx.Observable.range(start, count, [scheduler])
Generates an observable sequence of integral numbers within a specified range, using the specified scheduler to send out observer messages.
Arguments
start
(Number
): The value of the first integer in the sequence.count
(Number
): The number of sequential integers to generate.[scheduler=Rx.Scheduler.currentThread]
(Scheduler
): Scheduler to run the generator loop on. If not specified, defaults to Scheduler.currentThread.
Returns
(Observable
): An observable sequence that contains a range of sequential integral numbers.
Example
var source = Rx.Observable.range(0, 3);
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
// => Completed
Location
File:
Dist:
Prerequisites:
NPM Packages:
NuGet Packages:
Unit Tests: