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
  0b551bb7_a819_169d_c90c_6998a28bd742["matches()"]
  df063946_7158_b993_ea79_ae2622374b9a["keep-alive.ts"]
  0b551bb7_a819_169d_c90c_6998a28bd742 -->|defined in| df063946_7158_b993_ea79_ae2622374b9a
  ae11784e_db7d_8803_d9f6_24ad5ae3a6c2["default.mounted()"]
  ae11784e_db7d_8803_d9f6_24ad5ae3a6c2 -->|calls| 0b551bb7_a819_169d_c90c_6998a28bd742
  1bd7b41e_bed6_4a08_d909_d52653fb679b["default.render()"]
  1bd7b41e_bed6_4a08_d909_d52653fb679b -->|calls| 0b551bb7_a819_169d_c90c_6998a28bd742
  style 0b551bb7_a819_169d_c90c_6998a28bd742 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