Hacker News new | ask | show | jobs
by thenbe 909 days ago
You can roll your own or use a utility library. A simple zero-dependency library would be something like just-* [1]. Although I now prefer remeda [2] as it seems to have the best typescript support, especially the strict variants such as `groupBy.strict`.

[1] https://github.com/angus-c/just#just-group-by

[2] https://remedajs.com/docs#groupBy