This is RxJS v 4. Find the latest version here
Generates an observable sequence of integral numbers within a specified range, using the specified scheduler to send out observer messages.
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.
(Observable
): An observable sequence that contains a range of sequential integral numbers.
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
File:
Dist:
Prerequisites:
NPM Packages:
NuGet Packages:
Unit Tests: