(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| var Rx = require('rx'); | |
| /** | |
| * Generate a 'sliding window' of the input time series. Please note that this function assumes that the observable | |
| * input series is a linear time series, that is: `selector(n) < selector(n+1)`. Otherwise things will get weird. | |
| * | |
| * @param windowSizeMs - size of the sliding window in ms | |
| * @param {function} [selector] - selector function that obtains the unix timestamp value for a given item | |
| * @param {Rx.Scheduler} [scheduler] - optional scheduler | |
| * @returns {Rx.Observable<T>} |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.