Skip to content

Instantly share code, notes, and snippets.

@cartant
Last active August 3, 2017 01:11
Show Gist options
  • Save cartant/1edf3b0198b7210d8caab1f95f646029 to your computer and use it in GitHub Desktop.
Save cartant/1edf3b0198b7210d8caab1f95f646029 to your computer and use it in GitHub Desktop.
medium-rxjs-debugging
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