Array.prototype.toObjectByProperty( element=>element.property )

Naveen Chawla naveen.chwl at gmail.com
Fri Aug 11 04:57:59 UTC 2017


You lose at least the square bracket and dot notations for access, as
disadvantages, and I'm not aware of any advantages. If there aren't any
that compensate for the disadvantages, then it's a net negative

On Fri, 11 Aug 2017 at 09:41 Naveen Chawla <naveen.chwl at gmail.com> wrote:

> `Map.fromIterable(allThePeople, person=>person.name)` is less verbose for
> your use case
>
> On Fri, 11 Aug 2017 at 03:54 Alexander Jones <alex at weej.com> wrote:
>
>> As far as I'm concerned, "most data arrays" — at least the ones you're
>> speaking about — should actually be `Map`s.
>>
>
> Why? What's the advantage?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170811/e8e30f76/attachment-0001.html>


More information about the es-discuss mailing list