(key: string)
| 58 | } |
| 59 | |
| 60 | function formatMetadataLabel(key: string): string { |
| 61 | return key |
| 62 | .replace(/([a-z0-9])([A-Z])/g, '$1 $2') |
| 63 | .replace(/[_-]+/g, ' ') |
| 64 | .replace(/\b\w/g, (char) => char.toUpperCase()) |
| 65 | } |
| 66 | |
| 67 | function formatPrimitiveValue(value: string | number | boolean | null): string { |
| 68 | if (value === null) return '-' |
no test coverage detected