Skip to content

Instantly share code, notes, and snippets.

@sergzak022
Created January 18, 2018 21:42
Show Gist options
  • Save sergzak022/aa529a0c9d82fd05de8089efa218d1b0 to your computer and use it in GitHub Desktop.
Save sergzak022/aa529a0c9d82fd05de8089efa218d1b0 to your computer and use it in GitHub Desktop.
RxJS: Switching and Exhausting
var exhausted$ = source$.exhaustMap((number) => {
return multBy2Delayed(number);
});
// Code above will work exactly the same as code bellow
var exhausted$ = source$.map((number) => {
return multBy2Delayed(number);
}).exhaust();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment