Answer the question
In order to leave comments, you need to log in
How to collapse events in RXJS stream by time?
Please tell a newbie.
There is a stream that generates events extremely unevenly - it can be silent for a minute, and then 100 events per second. I want to split events into time intervals and skip only the last event in the interval (if they were in the interval at all).
Judging by the documentation, windowsTime(500) should break the stream into substreams of 0.5 seconds. Created a structure:
.pipe(
windowTime(500),
takeLast(1),
concatAll()
).subscribe(...)
Answer the question
In order to leave comments, you need to log in
auditTime, as far as I understood from the description.
no collapses needed, takeLast and concatAll don't work like that at all
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question