5 lines
175 B
TypeScript
5 lines
175 B
TypeScript
export function convertInputKeyToKey<T extends string>(inputKey: string) {
|
|
const str = inputKey.replace('input', '');
|
|
return (str[0].toLowerCase() + str.slice(1)) as T;
|
|
}
|