(
obj: { [key: string]: T },
fn: (value: T, key: string) => U
)
| 1 | export function mapValues<T, U>( |
| 2 | obj: { [key: string]: T }, |
| 3 | fn: (value: T, key: string) => U |
| 4 | ): { [key: string]: U } { |
| 5 | return Object.keys(obj).reduce((result, key) => { |
| 6 | result[key] = fn(obj[key], key); |
| 7 | return result; |
| 8 | }, {} as { [key: string]: U }); |
| 9 | } |
nothing calls this directly
no outgoing calls
no test coverage detected