normalizeInject() — vue Function Reference
Architecture documentation for the normalizeInject() function in options.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 54876847_1df2_cdb1_bbe2_f88f5df7e25c["normalizeInject()"] 395cc6b0_6f88_f1b1_f5dd_8cdf5c229777["options.ts"] 54876847_1df2_cdb1_bbe2_f88f5df7e25c -->|defined in| 395cc6b0_6f88_f1b1_f5dd_8cdf5c229777 85601896_bdd4_0d52_f164_49f970cbbef3["mergeOptions()"] 85601896_bdd4_0d52_f164_49f970cbbef3 -->|calls| 54876847_1df2_cdb1_bbe2_f88f5df7e25c 48bc61b1_05ca_3121_50a7_2f02cdcf2f03["warn()"] 54876847_1df2_cdb1_bbe2_f88f5df7e25c -->|calls| 48bc61b1_05ca_3121_50a7_2f02cdcf2f03 style 54876847_1df2_cdb1_bbe2_f88f5df7e25c 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