Last active
October 22, 2017 20:19
-
-
Save rarmatei/bc6fab6b7b4748cc320bdd3ca36bdfb5 to your computer and use it in GitHub Desktop.
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
subscribeUpdates | |
.scan((total, change) => change + total, 0) | |
.switchMap(count => { | |
return count === 0 | |
? Observable.timer(delay) | |
.do(_ => /* tear-down logic */ ) | |
: Observable.never(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment