This repository has been archived by the owner. It is now read-only.
Permalink
62 lines (47 sloc) 1.91 KB

This is RxJS v 4. Find the latest version here

Rx.Observable.of(...args)

Converts arguments to an observable sequence.

Arguments

  1. args (Arguments): A list of arguments to turn into an Observable sequence.

Returns

(Observable): The observable sequence whose elements are pulled from the given arguments.

Example

var source = Rx.Observable.of(1,2,3);

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
// => Completed

Location

File:

Dist:

Prerequisites:

  • None

NPM Packages:

NuGet Packages:

Unit Tests: