Re: [Proposal] Array.prototype.includes should evaluate object.toString and/or object.valueOf when determining a match

2018-06-20 Thread Mike Simon
priate for this use case. > > ```js > items.some(o => o == 'abc'); > ``` > > Regards > >> On Wed, Jun 20, 2018 at 8:27 PM, Mike Simon wrote: >> [Proposal] Array.prototype.includes should evaluate object.toString and/or >> object.valueOf when determinin

[Proposal] Array.prototype.includes should evaluate object.toString and/or object.valueOf when determining a match

2018-06-20 Thread Mike Simon
[Proposal] Array.prototype.includes should evaluate object.toString and/or object.valueOf when determining a match The problem: If I have a list of objects that contain a toString() prototype that returns a value from the object, Array.prototype.includes does not return true if the