normalizeInject() — vue Function Reference
Architecture documentation for the normalizeInject() function in options.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 110512ab_6565_25cb_454b_0398b25624f9["normalizeInject()"] 5c734a8f_efba_819c_28fc_f56bfd6b701f["options.ts"] 110512ab_6565_25cb_454b_0398b25624f9 -->|defined in| 5c734a8f_efba_819c_28fc_f56bfd6b701f 74488b2b_ad6c_b2c0_5bac_8703e8f1b25e["mergeOptions()"] 74488b2b_ad6c_b2c0_5bac_8703e8f1b25e -->|calls| 110512ab_6565_25cb_454b_0398b25624f9 e8b22500_20a5_2e19_4c79_386004841499["warn()"] 110512ab_6565_25cb_454b_0398b25624f9 -->|calls| e8b22500_20a5_2e19_4c79_386004841499 style 110512ab_6565_25cb_454b_0398b25624f9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/core/util/options.ts lines 358–380
function normalizeInject(options: Record<string, any>, vm?: Component | null) {
const inject = options.inject
if (!inject) return
const normalized: Record<string, any> = (options.inject = {})
if (isArray(inject)) {
for (let i = 0; i < inject.length; i++) {
normalized[inject[i]] = { from: inject[i] }
}
} else if (isPlainObject(inject)) {
for (const key in inject) {
const val = inject[key]
normalized[key] = isPlainObject(val)
? extend({ from: key }, val)
: { from: val }
}
} else if (__DEV__) {
warn(
`Invalid value for option "inject": expected an Array or an Object, ` +
`but got ${toRawType(inject)}.`,
vm
)
}
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does normalizeInject() do?
normalizeInject() is a function in the vue codebase, defined in src/core/util/options.ts.
Where is normalizeInject() defined?
normalizeInject() is defined in src/core/util/options.ts at line 358.
What does normalizeInject() call?
normalizeInject() calls 1 function(s): warn.
What calls normalizeInject()?
normalizeInject() is called by 1 function(s): mergeOptions.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free