tc39/proposal-array-grouping
View on GitHub ↗ ★ 525 HTML archived
A proposal to make grouping of array items easier
7 mentions on Hacker News by 7 people: 1 story, 6 comments · first 2021-11-01 · latest 2023-12-19
20082026
-
…But a method named `groupBy` on iterators traditionally means a different thing: https://github.com/tc39/proposal-array-grouping/issues/51#is... Global iterable type it's too late for, since there's many extant iterables in the language an
comment by bakkoting · 2023-12-19 · in TC39: Add Object.groupBy and Map.groupBy -
In case you need a example, there is a good one here: https://github.com/tc39/proposal-array-grouping/
comment by mattlondon · 2023-12-19 · in TC39: Add Object.groupBy and Map.groupBy -
What about Object.fromEntries? See https://github.com/tc39/proposal-array-grouping for why this isn’t a method on Array.prototype.
comment by danvk · 2023-12-19 · in TC39: Add Object.groupBy and Map.groupBy -
…of possibly breaking sites, before eventually renaming the method from .groupBy to .group https://github.com/tc39/proposal-array-grouping/issues/37
comment by inbx0 · 2022-10-11 · in SmooshGate (2021) -
…groupByToWeakMap and groupByToRecord (should records land). Edit: this has already been discussed https://github.com/tc39/proposal-array-grouping/issues/3
comment by roebk · 2021-12-29 · in Using GroupBy on an array of objects in JavaScript -
It looks like they are also creating a "groupByToMap" for that reason. See: https://github.com/tc39/proposal-array-grouping Property keys can also be symbol objects and it seems like that's supported by the groupBy function in addition to…
comment by shawnz · 2021-12-29 · in Using GroupBy on an array of objects in JavaScript