@scalar/api-client
Version:
the open source API testing client
5 lines • 331 B
TypeScript
/**
* Group together array objects by a specific key
*/
export declare const groupBy: <T extends Record<string, unknown>, K extends keyof T, V extends string | number | symbol = Extract<T[K], string | number | symbol>, R = T>(arr: T[], key: K, transform?: (item: T) => R) => Record<V, R[]>;
//# sourceMappingURL=group-by.d.ts.map