rx-log

0.1.1 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i rx-log

Weekly Downloads

0

Version

0.1.1

License

ISC

Last publish

Collaborators

  • whitecolor