I'm looking for an operator which transform the stream to the stream with history or last N events.
So for a stream e.g. like this one:
clicks$.subscribe((ev) => ...)
I would like to have something like:
clicks$.pipe(
historyOf(2)
).subscribe(([ev, ev-1, ev-2]) => ...)
Does the operator like this exists, or is there an easy way to combine existing operators to achieve the desired effect?