rxviz

Rx Visualizer - Animated playground for Rx Observables

Github星跟蹤圖

Description

RxViz simply visualizes a given Observable. Your JavaScript code will be evaluated, and, if the last expression is an Observable, a nice animated visualization will appear.

You can also:

  • Control the speed of the animation by modifying the Time window input.
  • Copy the resulting SVG to include in your next Rx presentation.
  • Share the visualization with your friends.

Examples

Basic interval

rxviz-basic-interval

Random error

rxviz-random-error

Higher order Observable

rxviz-higher-order-observable

Pause and resume

rxviz-pause-and-resume

How does it work?

RxViz treats the evaluated Observable as a black box. We rely only on the fact that Observable emits values over time. RxViz doesn't rely on the internals of RxJS. This will allow us to visualize TC39 Observables in the future.

Technically, we subscribe to the given Observable, and, once a value is observed, we simply add it to the visualization. It's that simple!

How about higher order Observables?

No different. Since a higher order Observable is simply an Observable whose values are Observables themselves, we just repeat the process recursively.

When an Observable value is seen, we subscribe to it. At this point, we create a new "branch" in the visualization.

Thanks

Running locally

npm install
npm run dev

主要指標

概覽
名稱與所有者moroshko/rxviz
主編程語言JavaScript
編程語言JavaScript (語言數: 1)
平台
許可證MIT License
所有者活动
創建於2017-06-07 07:05:33
推送於2024-09-06 02:53:24
最后一次提交2024-09-06 12:53:24
發布數0
用户参与
星數1.6k
關注者數25
派生數94
提交數66
已啟用問題?
問題數22
打開的問題數11
拉請求數8
打開的拉請求數19
關閉的拉請求數10
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?