export function objectMap( input: Input, mapper: (value: InputValue, key: string) => OutputValue ): {[P in keyof Input]: OutputValue} { const output: any = {} for (const [key, value] of Object.entries(input)) output[key] = mapper(value, key) return output }