Function mapKeys
- map
Keys <T>(record, transformer): Record<string, T> Type Parameters
Parameters
- record: Readonly<Record<string, T>>
The record to map keys from.
- transformer: ((key: string) => string)
The function to transform each key.
- (key): string
Parameters
- key: string
Returns string
Returns Record<string, T>
A new record with all keys transformed by the given transformer.
- record: Readonly<Record<string, T>>
Applies the given transformer to all keys in the given record's entries and returns a new record containing the transformed entries.
If the transformed entries contain the same key multiple times, only the last one will appear in the returned record.