Array.prototype.toObjectByProperty( element=>element.property )
T.J. Crowder
tj.crowder at farsightsoftware.com
Wed Aug 9 07:41:41 UTC 2017
On Wed, Aug 9, 2017 at 8:35 AM, Naveen Chawla <naveen.chwl at gmail.com> wrote:
>
> It would be in the `iteratable` `protocol` (interface)
As Jordan said, that's likely to be a nonstarter. The Iterable protocol is
*very* lean (exactly one required property) for a reason: So it can be
supported with minimum investment. Much better, IMHO, to put functions on
`Object` and `Map` (which is why that's what I suggested).
-- T.J. Crowder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170809/ef615fe3/attachment.html>
More information about the es-discuss
mailing list