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

Combines all stream values into one array, emits this array and immediately completes

const { rxObserver } = require('api/v0.3');
const { timer } = require('rxjs');
const { take, toArray } = require('rxjs/operators');

// create a timer with 3 events
const source$ = timer(0, 5).pipe(

// collapse all events into one array
const result$ = source$.pipe(

source$.subscribe(rxObserver('timer(0, 10).take(4)'));
You can’t perform that action at this time.