1 export const objectMap = <Obj extends { [key: string]: any }, R extends any>(
3 map: (key: keyof Obj, value: Obj[keyof Obj]) => R
5 return Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, map(key, value)])) as {
10 export const entriesMap =
11 <K extends string, T extends any>(entries: [K, T][]) =>
12 <R extends any>(map: (value: T) => R): [K, R][] =>
13 entries.map(([key, value]) => [key, map(value)]);