determineFileType() — ui Function Reference
Architecture documentation for the determineFileType() function in utils.ts from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 8c29518a_8ec2_4c35_3d61_15a1d667b772["determineFileType()"] edc2979a_e040_ab0c_5174_c69f7c8fa905["utils.ts"] 8c29518a_8ec2_4c35_3d61_15a1d667b772 -->|defined in| edc2979a_e040_ab0c_5174_c69f7c8fa905 1c6f4236_a28d_b482_92b7_3da2a29a6be9["recursivelyResolveFileImports()"] 1c6f4236_a28d_b482_92b7_3da2a29a6be9 -->|calls| 8c29518a_8ec2_4c35_3d61_15a1d667b772 style 8c29518a_8ec2_4c35_3d61_15a1d667b772 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/shadcn/src/registry/utils.ts lines 232–252
function determineFileType(
moduleSpecifier: string
): z.infer<typeof registryItemSchema>["type"] {
if (moduleSpecifier.includes("/ui/")) {
return "registry:ui"
}
if (moduleSpecifier.includes("/lib/")) {
return "registry:lib"
}
if (moduleSpecifier.includes("/hooks/")) {
return "registry:hook"
}
if (moduleSpecifier.includes("/components/")) {
return "registry:component"
}
return "registry:component"
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does determineFileType() do?
determineFileType() is a function in the ui codebase, defined in packages/shadcn/src/registry/utils.ts.
Where is determineFileType() defined?
determineFileType() is defined in packages/shadcn/src/registry/utils.ts at line 232.
What calls determineFileType()?
determineFileType() is called by 1 function(s): recursivelyResolveFileImports.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free