Created
January 18, 2018 21:41
-
-
Save sergzak022/9910e5bd97d07a00b1d991f0c0dcf91a to your computer and use it in GitHub Desktop.
RxJS: Switching and Exhausting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var switched$ = source$.map((number) => { | |
return multBy2Delayed(number); | |
}).switch(); | |
// Code above will work exactly the same as code bellow | |
var switched$ = source$.switchMap((number) => { | |
return multBy2Delayed(number); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment