I'm building an observable from an event, which outputs text lines that confirm records which are divided by two empty lines. For example:
xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx
I'd like the observable to split the output by two new lines, so the subscriber gets the data in chunks.
How can I accomplish this using RxJS? It doesn't seem to have a function to perform this job.
I could subscribe to the observer, accumulate values and re-emit myself, but I believe there is a more elegant solution that I'm not seeing.