resolveAsset() — vue Function Reference
Architecture documentation for the resolveAsset() function in options.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD f9462a81_a8d5_9062_8a24_a56d8ba459fc["resolveAsset()"] 4eef67a1_feb3_dd8c_e42a_2d625c9694ff["renderStartingTag()"] 4eef67a1_feb3_dd8c_e42a_2d625c9694ff -->|calls| f9462a81_a8d5_9062_8a24_a56d8ba459fc 48552ac3_589d_0990_1979_1bd455665b33["hasOwn()"] f9462a81_a8d5_9062_8a24_a56d8ba459fc -->|calls| 48552ac3_589d_0990_1979_1bd455665b33 447f7b2d_d677_800e_b42e_db97e7d830a7["camelize()"] f9462a81_a8d5_9062_8a24_a56d8ba459fc -->|calls| 447f7b2d_d677_800e_b42e_db97e7d830a7 4cc66a79_034b_1114_66f2_674d202356f6["capitalize()"] f9462a81_a8d5_9062_8a24_a56d8ba459fc -->|calls| 4cc66a79_034b_1114_66f2_674d202356f6 a8c8f192_fd2d_dbe3_46ed_dd8fabebc429["warn()"] f9462a81_a8d5_9062_8a24_a56d8ba459fc -->|calls| a8c8f192_fd2d_dbe3_46ed_dd8fabebc429 style f9462a81_a8d5_9062_8a24_a56d8ba459fc fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/core/util/options.ts lines 466–489
export function resolveAsset(
options: Record<string, any>,
type: string,
id: string,
warnMissing?: boolean
): any {
/* istanbul ignore if */
if (typeof id !== 'string') {
return
}
const assets = options[type]
// check local registration variations first
if (hasOwn(assets, id)) return assets[id]
const camelizedId = camelize(id)
if (hasOwn(assets, camelizedId)) return assets[camelizedId]
const PascalCaseId = capitalize(camelizedId)
if (hasOwn(assets, PascalCaseId)) return assets[PascalCaseId]
// fallback to prototype chain
const res = assets[id] || assets[camelizedId] || assets[PascalCaseId]
if (__DEV__ && warnMissing && !res) {
warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id)
}
return res
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does resolveAsset() do?
resolveAsset() is a function in the vue codebase.
What does resolveAsset() call?
resolveAsset() calls 4 function(s): camelize, capitalize, hasOwn, warn.
What calls resolveAsset()?
resolveAsset() is called by 1 function(s): renderStartingTag.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free