2026-04-16 03:45:34 +02:00
|
|
|
export function humanizePropertyKey(key: string): string {
|
2026-04-17 15:33:17 +02:00
|
|
|
const normalized = key.replace(/^_+/, '')
|
|
|
|
|
const spaced = normalized.replace(/[_-]/g, ' ')
|
2026-04-16 03:45:34 +02:00
|
|
|
if (!spaced) return spaced
|
|
|
|
|
return spaced.charAt(0).toUpperCase() + spaced.slice(1)
|
|
|
|
|
}
|