UNPKG

syncpack

Version:

Consistent dependency versions in large JavaScript Monorepos

7 lines (6 loc) 290 B
/** * Convert an array of objects to an object, where each member of the array has * a unique value for the given key. The new object keys each object by its * value for the given key. */ export declare function keyBy<A extends any[]>(key: string, array: A): Record<string, A[number]>;