Does anybody have any opinion on a new Array.prototype.each method that does the same as forEach but returns the array, thereby allowing chaining with sort, map, filter etc., while also preserving backwards compatibility?
On Sat, 8 Jul 2017, 1:08 p.m. T.J. Crowder, <tj.crow...@farsightsoftware.com> wrote: > On Sat, Jul 8, 2017 at 1:40 AM, Michael J. Ryan <track...@gmail.com> > wrote: > >> Woudn't Array.prototype.all satisfy those use cases, they run until a >> falsy value is returned. >> > > Is there an `Array.prototype.all` proposal? I'm not seeing it on github. > If you're thinking of `every` and `some`, they don't return a reference to > the array, which seemed to be important to Naveen for chaining. > > -- T.J. Crowder >
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss