1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
const { rxObserver } = require('api/v0.3');
const { merge, timer } = require('rxjs');
const { buffer, take } = require('rxjs/operators');
const source$ = merge(timer(0, 200), timer(300));
const trigger$ = timer(0, 250);
const buffered$ = source$.pipe(
buffer(trigger$)
);
source$.subscribe(rxObserver('source$'));
trigger$.subscribe(rxObserver('Buffer trigger$'));
buffered$.subscribe(rxObserver('buffered$'));
⚠️ Execution time is limited to 1000ms