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 strings, see: https://tc39.es/proposal-array-grouping/