rx-log
v0.1.1
Published
Log (debug) method for rx.js
Downloads
3
Readme
Rx-log
A shortcut for debug console output of rx.js streams.
Read this article How to debug RxJS code
Usage:
Rx.Observable.timer(0, 1000)
.log('timer$')
Instead of:
Rx.Observable.timer(0, 1000)
.do(val => console.log('timer$', val))
You may also do use .warn
and .info
methods:
const Rx = require('rx')
require('rx-log')
Rx.Observable.timer(0, 1000)
.info((x) => `timer$ value is ${x}`)
Rx.Observable.timer(0, 1000)
.warn('timer$ value', (x) => `${x} ms`)
Why to use it?
Just makes you write and debug code faster.