import type { AnyObject } from './types'; /** * groups values from the provided array or object based on the result of the provided mapper function * @example * const arr = [ * { a: 1, b: 2 }, * { a: 2, b: 4 }, * { a: 3, b: 6 }, * ] * groupBy(el => (el.a % 2 === 0 ? 'even' : 'odd'), arr) * // returns { * // odd: [ * // { a: 1, b: 2 }, * // { a: 3, b: 6 }, * // ], * // even: [{ a: 2, b: 4 }], * // } */ export default function groupBy(mapper: (element: T) => PropertyKey, collection: T[] | Record): Record; //# sourceMappingURL=groupBy.d.ts.map