extractItemIdentifierFromDependency() — ui Function Reference
Architecture documentation for the extractItemIdentifierFromDependency() function in resolver.ts from the ui codebase.
Entity Profile
Dependency Diagram
graph TD fdbe99c6_359b_8328_7270_49407cee1afa["extractItemIdentifierFromDependency()"] c819bacb_5122_731b_64d6_d23131b1f806["resolver.ts"] fdbe99c6_359b_8328_7270_49407cee1afa -->|defined in| c819bacb_5122_731b_64d6_d23131b1f806 b52dca21_c127_9ab7_c3a4_02bb7ad550be["topologicalSortRegistryItems()"] b52dca21_c127_9ab7_c3a4_02bb7ad550be -->|calls| fdbe99c6_359b_8328_7270_49407cee1afa c370e00a_83e4_54e2_7925_81dcdb37bc1d["computeItemHash()"] fdbe99c6_359b_8328_7270_49407cee1afa -->|calls| c370e00a_83e4_54e2_7925_81dcdb37bc1d style fdbe99c6_359b_8328_7270_49407cee1afa fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/shadcn/src/registry/resolver.ts lines 592–620
function extractItemIdentifierFromDependency(dependency: string) {
if (isUrl(dependency)) {
const url = new URL(dependency)
const pathname = url.pathname
const match = pathname.match(/\/([^/]+)\.json$/)
const name = match ? match[1] : path.basename(pathname, ".json")
return {
name,
hash: computeItemHash({ name }, dependency),
}
}
if (isLocalFile(dependency)) {
const match = dependency.match(/\/([^/]+)\.json$/)
const name = match ? match[1] : path.basename(dependency, ".json")
return {
name,
hash: computeItemHash({ name }, dependency),
}
}
const { item } = parseRegistryAndItemFromString(dependency)
return {
name: item,
hash: computeItemHash({ name: item }, dependency),
}
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does extractItemIdentifierFromDependency() do?
extractItemIdentifierFromDependency() is a function in the ui codebase, defined in packages/shadcn/src/registry/resolver.ts.
Where is extractItemIdentifierFromDependency() defined?
extractItemIdentifierFromDependency() is defined in packages/shadcn/src/registry/resolver.ts at line 592.
What does extractItemIdentifierFromDependency() call?
extractItemIdentifierFromDependency() calls 1 function(s): computeItemHash.
What calls extractItemIdentifierFromDependency()?
extractItemIdentifierFromDependency() is called by 1 function(s): topologicalSortRegistryItems.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free