feat: implement toCamelCase utility function and update Clean Architecture generator to use it

This commit is contained in:
didavila
2026-03-24 15:12:52 +01:00
parent a8ecb15a09
commit 3fe2333a03
2 changed files with 29 additions and 20 deletions

View File

@@ -0,0 +1,12 @@
/**
* Converts a PascalCase name to camelCase by lowercasing the first character.
* Used to derive class filenames and variable names from schema/tag names.
*
* @example
* toCamelCase('ProductResponse') // 'productResponse'
* toCamelCase('UserSchema') // 'userSchema'
*/
export function toCamelCase(name: string): string {
if (!name) return name;
return name.charAt(0).toLowerCase() + name.slice(1);
}