Most

Most.js is a toolkit for reactive programming. It helps you compose asynchronous operations on streams of values and events, e.g. WebSocket messages, DOM events, etc, and on time-varying values, e.g. the "current value" of an <input>, without many of the hazards of side effects and mutable shared state.

It features an ultra-high performance, low overhead architecture, APIs for easily creating event streams from existing sources, like DOM events, and a small but powerful set of operations for merging, filtering, transforming, and reducing event streams and time-varying values.

import{generate}from'most'function*allTheIntegers(interval){leti=0while(true){yielddelayPromise(interval,i++)}}constdelayPromise=(ms,value)=>newPromise(resolve=>setTimeout(()=>resolve(value),ms))// Log the first 100 integers, at 1 second intervalsgenerate(allTheIntegers,1000).take(100).observe(x=>console.log(x))