Home / Function/ matches() — vue Function Reference

matches() — vue Function Reference

Architecture documentation for the matches() function in keep-alive.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  7148fd83_ca43_5e18_2c2e_12a141f3eda2["matches()"]
  302828a5_7155_979e_f7d9_5b26a70fd7d0["keep-alive.ts"]
  7148fd83_ca43_5e18_2c2e_12a141f3eda2 -->|defined in| 302828a5_7155_979e_f7d9_5b26a70fd7d0
  64fb886a_b184_1d61_f5f0_e81d03183da4["default.mounted()"]
  64fb886a_b184_1d61_f5f0_e81d03183da4 -->|calls| 7148fd83_ca43_5e18_2c2e_12a141f3eda2
  0f3602d7_5826_12c2_2045_c98c2b8840e4["default.render()"]
  0f3602d7_5826_12c2_2045_c98c2b8840e4 -->|calls| 7148fd83_ca43_5e18_2c2e_12a141f3eda2
  style 7148fd83_ca43_5e18_2c2e_12a141f3eda2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/components/keep-alive.ts lines 20–33

function matches(
  pattern: string | RegExp | Array<string>,
  name: string
): boolean {
  if (isArray(pattern)) {
    return pattern.indexOf(name) > -1
  } else if (typeof pattern === 'string') {
    return pattern.split(',').indexOf(name) > -1
  } else if (isRegExp(pattern)) {
    return pattern.test(name)
  }
  /* istanbul ignore next */
  return false
}

Domain

Subdomains

Frequently Asked Questions

What does matches() do?
matches() is a function in the vue codebase, defined in src/core/components/keep-alive.ts.
Where is matches() defined?
matches() is defined in src/core/components/keep-alive.ts at line 20.
What calls matches()?
matches() is called by 2 function(s): default.mounted, default.render.

Analyze Your Own Codebase

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

Try Supermodel Free