Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Latest commit

 

History

History
59 lines (46 loc) · 2.4 KB

range.md

File metadata and controls

59 lines (46 loc) · 2.4 KB

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

  1. start (Number): The value of the first integer in the sequence.
  2. count (Number): The number of sequential integers to generate.
  3. [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: