SW-3490 set metadata for routes * feat(SW-3490): Set metadata title for hotelreservation paths Approved-by: Anton Gunnarsson
14 lines
402 B
TypeScript
14 lines
402 B
TypeScript
export function toCapitalCase(value: string): string
|
|
export function toCapitalCase(value: null): null
|
|
export function toCapitalCase(value: undefined): undefined
|
|
export function toCapitalCase(
|
|
value: string | null | undefined
|
|
): string | null | undefined {
|
|
if (!value) return value
|
|
|
|
value = value.trim()
|
|
if (!value) return value
|
|
|
|
return value[0].toUpperCase() + value.slice(1).toLowerCase()
|
|
}
|