SHARE
TWEET

Untitled

a guest Feb 17th, 2017 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import $ from 'jquery';
  2. import Rx from 'rxjs/Rx';
  3.  
  4. const source1$ = Rx.Observable.interval(2000)
  5. .map(v=>'s1 ' + v);
  6. const source2$ = Rx.Observable.interval(1500)
  7. .map(v=>'s2 ' + v);
  8.  
  9. Rx.Observable.merge(source1$, source2$)
  10. .take(15).subscribe(v=>console.log(v));
RAW Paste Data
Top