onsa
5/1/2017 - 3:35 PM

Observables

Observables

observable.next(someValue);

observable.create(observer => {
  observer.next(someValue);
  asyncFunction.then(response => observer.next(response));
});
observable.delay(milliseconds)
          .throttleTime(milliseconds)               // delete events within interval
          .debounceTime(milliseconds)               // keep last event within interval
          .take(times)
          .takeUntil(other observable)
          .filter(event => some statement)
          .map(event => return some value)
          .subscribe(value => some processing)
          
Rx.Observable.of('foo', 'bar');
             .from([1, 2, 3]);
             .fromEvent(element, 'click');
             .fromPromise(promise);