"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.groupBy = void 0;
var groupBy = exports.groupBy = function groupBy(arr, attr, keyRenamer) {
  return (
    // Ignored via go/ees005
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    arr.reduce(function (acc, item) {
      acc[keyRenamer(item[attr])] = item;
      return acc;
    }, {})
  );
};