proposal-emitter
proposal-emitter copied to clipboard
Ahead of reading this: I'd greatly like to apologize from any perceived tone here. It's very hard to criticize someone else's hard work without it sounding a little bad in...
It took me a significant amount of reading and synthesizing before I finally figured out exactly how Emitters worked: * They're Promises, and can be resolved. * Before they're resolved,...
It's mentioned once in the docs that an ArrayEmitter doesn't send any values until it's run. (Not in the section on array emitters, tho.) For other emitters this isn't clear...
`race()` says that it resolves all the other emitters once the first one resolves. 1. What does it resolve them to? 2. How does it resolve Promises? 3. If we...
All the "transformation" emitters like `map()` treat trailing args as a composed emitter before themselves: `map(fn, ...emitters)` == `compose(...emitters, map(fn))`. But `on()`'s trailing arguments are composed after itself: `on(el, name,...
I was thinking the core of this could be simplified quite a bit, with some redundant bits removed and/or moved to helper functions: - `emitter = new Emitter(t => ({emit,...
The `Emitter` constructor, as far as I understand based on my reading of [this](https://github.com/tc39/proposal-emitter/blob/master/WALKTHROUGH.md#sending-values), has three parameters: - `d` - The received datum - `i` - The implicit metadata -...
It's not clear from the docs when various types of emitters get resolved, and what they resolve to.
Based on code in examples, Emitter objects appear to have several methods and properties on them, such as .send(), .next(), .value, etc. But these aren't documented anywhere and I don't...
```js [Symbol.iterator](){ return { next: () => ({ value: this.next(), done: this[done] }) , return: () => ({ value: this.resolve(), done: this[done] }) , throw: () => ({ value: this.reject(),...