Files
twenty_crm/packages/twenty-server/src/utils/camel-to-title-case.ts
martmull 6e4dc16f2b 12660 bugapi create one person post api request example is returning 400 in playground (#12787)
Use faker to provide simple working examples for REST API create one,
create many, update one and find duplicates

Eg:
<img width="1505" alt="image"
src="https://github.com/user-attachments/assets/99be990f-efd6-4ad7-8c29-f9dcecac112f"
/>
2025-06-23 18:24:42 +02:00

8 lines
230 B
TypeScript

import { capitalize } from 'twenty-shared/utils';
export const camelToTitleCase = (camelCaseText: string) =>
capitalize(
camelCaseText
.replace(/([A-Z])/g, ' $1')
.replace(/^./, (str) => str.toUpperCase()),
);