export const capitalize = (text: string) => { if (text && text.length > 0) return text.charAt(0).toUpperCase() + text.slice(1); else return ''; }; export const sliceFirstAndCapitalize = (text: string | undefined) => { if (text && text.length > 0) return text.charAt(0).toUpperCase(); else return ''; };