capitalize had been moved into twenty-shared. Let's remove the duplicates in server and front !
7 lines
212 B
TypeScript
7 lines
212 B
TypeScript
import { capitalize } from 'twenty-shared';
|
|
|
|
export const camelToTitleCase = (camelCaseText: string) =>
|
|
capitalize(camelCaseText)
|
|
.replace(/([A-Z])/g, ' $1')
|
|
.replace(/^./, (str) => str.toUpperCase());
|