Skip to content

groupBy duration parameter #7402

Answered by voliva
vdawg-git asked this question in Q&A
Dec 11, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

I've never used it, but you can see on the tests for an example: https://github.com/ReactiveX/rxjs/blob/master/packages/rxjs/spec/operators/groupBy-spec.ts#L91

It looks like you can return an observable that says when the group should be closed. On this example, it's using the same stream to say that it should get killed after the second emission.

If a new value comes through the stream for that group, a new group will be created.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@vdawg-git
Comment options

Answer selected by vdawg-git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants