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
  f53d1350_01c5_2199_8795_3199421f4009["matches()"]
  e66945bf_90c3_6642_9125_fe5a4c3e3e37["default.mounted()"]
  e66945bf_90c3_6642_9125_fe5a4c3e3e37 -->|calls| f53d1350_01c5_2199_8795_3199421f4009
  acf640b6_3f9a_6df2_5652_115082ad42f3["default.render()"]
  acf640b6_3f9a_6df2_5652_115082ad42f3 -->|calls| f53d1350_01c5_2199_8795_3199421f4009
  ccf33d6a_5c47_ff2f_9809_8d315f500b4b["isRegExp()"]
  f53d1350_01c5_2199_8795_3199421f4009 -->|calls| ccf33d6a_5c47_ff2f_9809_8d315f500b4b
  style f53d1350_01c5_2199_8795_3199421f4009 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

Calls

Frequently Asked Questions

What does matches() do?
matches() is a function in the vue codebase.
What does matches() call?
matches() calls 1 function(s): isRegExp.
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