Hacker GitHub

← All repos

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

Mentions per year 7 mentions · busiest year 2021 (3)
20082026
  1. …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
  2. 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
  3. What about Object.fromEntries? See https://github.com/tc39/proposal-array-grouping for why this isn’t a method on Array.prototype.
  4. …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)
  5. …groupByToWeakMap and groupByToRecord (should records land). Edit: this has already been discussed https://github.com/tc39/proposal-array-grouping/issues/3
  6. 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…
  7. ▲ 2
    TC39 Proposal for Array Grouping in JavaScript
    story by tentacleuno · 2021-11-01 · 1 comment