isUniversalRegistryItem() — ui Function Reference
Architecture documentation for the isUniversalRegistryItem() function in utils.ts from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 8ddcdfbe_d6bd_5d57_f9bf_ce44b542a4fa["isUniversalRegistryItem()"] edc2979a_e040_ab0c_5174_c69f7c8fa905["utils.ts"] 8ddcdfbe_d6bd_5d57_f9bf_ce44b542a4fa -->|defined in| edc2979a_e040_ab0c_5174_c69f7c8fa905 style 8ddcdfbe_d6bd_5d57_f9bf_ce44b542a4fa fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/shadcn/src/registry/utils.ts lines 275–300
export function isUniversalRegistryItem(
registryItem:
| Pick<z.infer<typeof registryItemSchema>, "files" | "type">
| null
| undefined
): boolean {
if (!registryItem) {
return false
}
if (
registryItem.type !== "registry:item" &&
registryItem.type !== "registry:file"
) {
return false
}
const files = registryItem.files ?? []
// If there are files, all must have targets and be of type registry:file or registry:item.
return files.every(
(file) =>
!!file.target &&
(file.type === "registry:file" || file.type === "registry:item")
)
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does isUniversalRegistryItem() do?
isUniversalRegistryItem() is a function in the ui codebase, defined in packages/shadcn/src/registry/utils.ts.
Where is isUniversalRegistryItem() defined?
isUniversalRegistryItem() is defined in packages/shadcn/src/registry/utils.ts at line 275.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free