toCamelCase() — ui Function Reference
Architecture documentation for the toCamelCase() function in update-fonts.ts from the ui codebase.
Entity Profile
Dependency Diagram
graph TD be054352_c049_f7d2_3c1b_6c75369c3aa8["toCamelCase()"] b169f1bf_76c5_e7c9_f493_15fe0f296591["update-fonts.ts"] be054352_c049_f7d2_3c1b_6c75369c3aa8 -->|defined in| b169f1bf_76c5_e7c9_f493_15fe0f296591 fb488c27_d35b_ddbe_26c7_6bfb5c38105a["transformLayoutFonts()"] fb488c27_d35b_ddbe_26c7_6bfb5c38105a -->|calls| be054352_c049_f7d2_3c1b_6c75369c3aa8 style be054352_c049_f7d2_3c1b_6c75369c3aa8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/shadcn/src/utils/updaters/update-fonts.ts lines 281–291
function toCamelCase(str: string) {
// Convert "Geist_Mono" -> "geistMono", "Inter" -> "inter".
return str
.split("_")
.map((part, index) =>
index === 0
? part.toLowerCase()
: part.charAt(0).toUpperCase() + part.slice(1).toLowerCase()
)
.join("")
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does toCamelCase() do?
toCamelCase() is a function in the ui codebase, defined in packages/shadcn/src/utils/updaters/update-fonts.ts.
Where is toCamelCase() defined?
toCamelCase() is defined in packages/shadcn/src/utils/updaters/update-fonts.ts at line 281.
What calls toCamelCase()?
toCamelCase() is called by 1 function(s): transformLayoutFonts.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free