Skip to content

Instantly share code, notes, and snippets.

@kievsash

kievsash/groupBy.js

Last active Jan 28, 2019
Embed
What would you like to do?
groupBy Solution
const selector = (x) => x.userId
const throttleTimeout = 3000;
source$
.pipe(
groupBy(selector),
mergeMap((group$) => group$.pipe(throttleTime(throttleTimeout)))
)
.subscribe(showNotification);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.