Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (18 sloc) 656 Bytes

Function from will turn an iterable, Promise, or Observable-like value into an Observable. Example using Promise:

const { rxObserver } = require('api/v0.3');
const { from } = require('rxjs');

const promise = new Promise((resolve, reject)=>{
  setTimeout(() => resolve('done'), 10);
});

from(promise)
  .subscribe(rxObserver('from(promise)'));

Also check this from iterable example

You can’t perform that action at this time.