Home / Function/ initUse() — vue Function Reference

initUse() — vue Function Reference

Architecture documentation for the initUse() function in use.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  4c2004eb_b2c9_532a_3bc8_e41ba108da37["initUse()"]
  1aa88392_154b_6e6d_97dc_8ac29df42778["initGlobalAPI()"]
  1aa88392_154b_6e6d_97dc_8ac29df42778 -->|calls| 4c2004eb_b2c9_532a_3bc8_e41ba108da37
  style 4c2004eb_b2c9_532a_3bc8_e41ba108da37 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/global-api/use.ts lines 4–23

export function initUse(Vue: GlobalAPI) {
  Vue.use = function (plugin: Function | any) {
    const installedPlugins =
      this._installedPlugins || (this._installedPlugins = [])
    if (installedPlugins.indexOf(plugin) > -1) {
      return this
    }

    // additional parameters
    const args = toArray(arguments, 1)
    args.unshift(this)
    if (isFunction(plugin.install)) {
      plugin.install.apply(plugin, args)
    } else if (isFunction(plugin)) {
      plugin.apply(null, args)
    }
    installedPlugins.push(plugin)
    return this
  }
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does initUse() do?
initUse() is a function in the vue codebase.
What calls initUse()?
initUse() is called by 1 function(s): initGlobalAPI.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free