Array.prototype.contains solutions

John-David Dalton john.david.dalton at
Tue Sep 30 17:12:34 PDT 2014

A more general solution seems like a good idea.
Renaming doesn't really solve the deeper issue.
Extending native prototypes is a JavaScript "thing" and something that will
most likely continue continue.

Ember adds methods to Array.prototype and Function.prototype by default: (btw their
Array#contains is not ES7 spec compliant either)

then there's the oldie Prototype.js:

and alternatives like Sugar.js:

that's a lot to watch out for.


On Tue, Sep 30, 2014 at 5:03 PM, Domenic Denicola <
domenic at> wrote:

> From: es-discuss [mailto:es-discuss-bounces at] On Behalf Of
> Domenic Denicola
> > Or you could attack the problem at the for-in level
> This half-sentence was a leftover from an earlier pass; please ignore it.
> _______________________________________________
> es-discuss mailing list
> es-discuss at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list