Hey! I'm YCMJason, a Software Engineer in London 👨💻. Love diving into tech puzzles and sharing them! 🧩
All views expressed here are my own opinions, so please take them with a pinch of salt! 🧂
I think what would be really nice to have is, instead of Promsie.map, Array.prototype.amap/Array.prototype.afilter and Array.prototype.areduce. They all return a promise. This would be really handy.
I think what would be really nice to have is, instead of
Promsie.map
,Array.prototype.amap
/Array.prototype.afilter
andArray.prototype.areduce
. They all return a promise. This would be really handy.This is essentially the same thing, but I think it is more intuitive to use.
What do you think about this idea?
That would be interesting.
But adding something to native JS API, thats a lot to hope for :)
There are lots of other Promise utilities which will offer us handy utilities like this out of the box.
BTW, based on your comment, you would be super interested in the new async iteration proposal
Kushan also gives a small example in his comment.