Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Rx .log monkey
Rx.Observable.prototype.log = function(prefix) {
return process.env.NODE_ENV !== "development" ? this : this
.doOnCompleted(() => console.log(prefix, "<completed>")) // eslint-disable-line
.do(x => console.log(prefix, x)) // eslint-disable-line
// const obs = Rx.Observable.fromEvent(text, "input")
// .log("InputEvent:")
// .map(e =>
// .filter(t => !!t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.