Home / Function/ parseFor() — vue Function Reference

parseFor() — vue Function Reference

Architecture documentation for the parseFor() function in index.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  2a7dd6ad_9d16_6c77_aaae_9b8a3f6afff9["parseFor()"]
  101d3d34_ac07_228f_62b9_5d5ac4a0ea2e["index.ts"]
  2a7dd6ad_9d16_6c77_aaae_9b8a3f6afff9 -->|defined in| 101d3d34_ac07_228f_62b9_5d5ac4a0ea2e
  d3b1b678_5e48_ff0d_a441_c2c615c22920["processFor()"]
  d3b1b678_5e48_ff0d_a441_c2c615c22920 -->|calls| 2a7dd6ad_9d16_6c77_aaae_9b8a3f6afff9
  style 2a7dd6ad_9d16_6c77_aaae_9b8a3f6afff9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/compiler/parser/index.ts lines 529–546

export function parseFor(exp: string): ForParseResult | undefined {
  const inMatch = exp.match(forAliasRE)
  if (!inMatch) return
  const res: any = {}
  res.for = inMatch[2].trim()
  const alias = inMatch[1].trim().replace(stripParensRE, '')
  const iteratorMatch = alias.match(forIteratorRE)
  if (iteratorMatch) {
    res.alias = alias.replace(forIteratorRE, '').trim()
    res.iterator1 = iteratorMatch[1].trim()
    if (iteratorMatch[2]) {
      res.iterator2 = iteratorMatch[2].trim()
    }
  } else {
    res.alias = alias
  }
  return res
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does parseFor() do?
parseFor() is a function in the vue codebase, defined in src/compiler/parser/index.ts.
Where is parseFor() defined?
parseFor() is defined in src/compiler/parser/index.ts at line 529.
What calls parseFor()?
parseFor() is called by 1 function(s): processFor.

Analyze Your Own Codebase

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

Try Supermodel Free