import { paramCase } from "param-case"; import { KebabCase as ParamCase } from "type-fest"; type ParamCaseObject> = { [P in keyof T as ParamCase

]: T[P]; }; export const paramCaseObject = >( obj: T, ): ParamCaseObject => { const result = {} as ParamCaseObject; for (const key in obj) { const paramKey = paramCase(key) as keyof typeof result; result[paramKey] = obj[key as keyof typeof obj]; } return result; };