dy / spect

Observable selectors in DOM
https://dy.github.io/spect
MIT License
74 stars 8 forks source link

Expose itertools on observable/iterator #223

Closed dy closed 4 years ago

dy commented 4 years ago

https://github.com/tc39/proposal-iterator-helpers

That would remove the need in creating v every here and there:

// now: every here and there, but transform should be used for _calc_!
v(ticker, v => 'Count: ' + v)

// proposed:
ticker.map(v => 'Count: ' + v)

Makes code clean and v instance more meaningful as class #207.

It may follow rxjs operators / array methods as minimal subset:

filter/reduce btw is not simply possible with v.

That will alleviate the v/f fuse - v can be used more as value container, not as transform.

dy commented 4 years ago

That will be covered when itertools are getting a bit closer to standard.