import {PairsObservable} from '@reactivex/rxjs/es6/observable/PairsObservable.js'
PairsObservable
Extends:
Ignored → PairsObservable
We need this JSDoc comment for affecting ESDoc.
Static Method Summary
Static Public Methods | ||
public static |
Convert an object into an observable sequence of [key, value] pairs using an optional IScheduler to enumerate the object. |
Static Public Methods
public static create(obj: Object, scheduler: Scheduler): Observable<Array<string | T>> source
Convert an object into an observable sequence of [key, value] pairs using an optional IScheduler to enumerate the object.
Return:
Observable<Array<string | T>> | An observable sequence of [key, value] pairs from the object. |
Example:
var obj = {
foo: 42,
bar: 56,
baz: 78
};
var source = Rx.Observable.pairs(obj);
var subscription = source.subscribe(
function (x) {
console.log('Next: %s', x);
},
function (err) {
console.log('Error: %s', err);
},
function () {
console.log('Completed');
});