r code to do that with ease, same goes for `find`
> or `findIndex`, very appropriate 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 evalu
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
t 8:27 PM, Mike Simon wrote:
> [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,
If you want to check properties or methods of an array of objects, you can
use `Array.prototype.some`.
On Wed, Jun 20, 2018, 12:27 Mike Simon wrote:
> [Proposal] Array.prototype.includes should evaluate object.toString
> and/or object.valueOf when determining a match
>
> The probl
[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
value
5 matches
Mail list logo