Polyfill for browsers and Node.js
It will ship in Chrome soon. But for browsers that will not immediately support it and Node.js is there a polyfill available?
@domfarolino and @benlesh maybe you know?
I just discovered observable-polyfill, the other day, in addition to #42 (which started as #107).
I's a very good start, as it follows the specs very clearly, step by step, but it needs a bit of love and a few updates to the latest spec. I've started adding some missing bits on local.
@keithamus @domfarolino @benlesh would you be happy to use this repo to host an official polyfill, if maybe myself plus any other volunteers teamed up to update it and help maintain it?
I've been meaning to carve out some time to update that polyfill. Happy to accept contributions of course! My personal opinion is that I don't think it's necessary to have an "official" polyfill as there are often subtleties between polyfills - some might want to aim for tigher spec compliance while others might be willing to sacrifice some of the spec edge cases for performance or code size.
fwiw, TC39 does not do any "official" or "blessed" polyfills, because it's not fair to all of the other implementations of a standard for the standard to give one of them its blessing. I would hope the web follows a similar principle.
At this point, I'm not looking for "blessed" or a specific polyfill like more standard compliant or more performance optimized. I am looking for ANY usable polyfill at all. It does not look like there is one, is there?
I see observable-polyfill, but last activity being 9 months ago and no tests - does not inspire confidence.
Ideally, rxjs would provide a polyfill, but it does not look like it does. rxjs is already TypeScript, ideally it would be split into two: (1) Observable polyfill; (2) all other remaining rxjs functionality.
RxJS inspired this spec in most part, but it's a separate project from this one. If you're looking to use Observable streams in a production application, you're definitely looking for RxJS and not this project (yet).
Otherwise, if you want to explore and experiment with prospective, future web standards for Observables, this is the place, but a polyfill would only help you create tests and demos for now.
WRT to observable-polyfill, I'm trying to make it work myself, working on a few demos and examples using it atm...
I see @keithamus has been shipping an updated version:
@dariomannu has been doing excellent work updating the library 🥳
Well, thanks @keithamus for starting it and doing most of the work. The idea didn't even cross my mind until I discovered it! :)
Anyway, I'm working on a few examples, too. If anybody wants to have some fun together, let's see what we can build with this now.
I've got a feeling that some novel (both good and bad) design patterns are about to emerge here...