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

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

A stream from an array

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

from([ 5, 10, 20 ])
  .subscribe(rxObserver('from([5, 10, 20])'));

And from a string

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

from('Hello')
  .subscribe(rxObserver(`from('Hello')`));

For promise conversion example see fromPromise

You can’t perform that action at this time.