Files
tolaria/src/utils/propertyLabels.ts
2026-04-17 15:33:17 +02:00

7 lines
242 B
TypeScript

export function humanizePropertyKey(key: string): string {
const normalized = key.replace(/^_+/, '')
const spaced = normalized.replace(/[_-]/g, ' ')
if (!spaced) return spaced
return spaced.charAt(0).toUpperCase() + spaced.slice(1)
}