Demo:  windowTime

windowTime operator is very similar to bufferTime. Whereas the buffer emits chunks of inputs in arrays, window emits them using separate observables.

windowTime emits items in a new observable, every periodic interval specified in miliseconds.

windowTime(intervalInMiliseconds)
//Emits the chunks of items in a new observable, every 2 sec
let input = timer(0,1500).pipe(take(7)).pipe(windowTime(2000))

//convert the data from the incoming observable into an array
let process = mergeMap(v=>v.pipe(toArray()))

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