Move capitalize into twenty-shared (#9414)
capitalize had been moved into twenty-shared. Let's remove the duplicates in server and front !
This commit is contained in:
@ -0,0 +1,7 @@
|
||||
import { isNonEmptyString } from '@sniptt/guards';
|
||||
|
||||
export const capitalize = (stringToCapitalize: string) => {
|
||||
if (!isNonEmptyString(stringToCapitalize)) return '';
|
||||
|
||||
return stringToCapitalize[0].toUpperCase() + stringToCapitalize.slice(1);
|
||||
};
|
||||
Reference in New Issue
Block a user