Last active
August 3, 2017 01:11
-
-
Save cartant/1edf3b0198b7210d8caab1f95f646029 to your computer and use it in GitHub Desktop.
medium-rxjs-debugging
This file contains hidden or 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
import { Observable } from "rxjs/Observable"; | |
import { spy } from "rxjs-spy"; | |
import "rxjs/add/observable/interval"; | |
import "rxjs/add/operator/map"; | |
import "rxjs/add/operator/mapTo"; | |
import "rxjs-spy/add/operator/tag"; | |
spy(); | |
const interval = new Observable | |
.interval(2000) | |
.tag("interval"); | |
const people = interval | |
.map((value) => { | |
const names = ["alice", "bob"]; | |
return names[value % names.length]; | |
}) | |
.tag("people") | |
.subscribe(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment