Demo:  buffer

buffer operator collects all the incoming data into arrays and emits based on the notification given the inner observable.

buffer(innerObservable)
let input = timer(0,1500).pipe(take(7));

//buffer and emit the data in arrays every 2 sec
let process = buffer(interval(2000));

let output=input.pipe(process).subscribe(v=>console.log(v))