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
  6d44d030_dc81_8f72_dc49_6a6e930f99ab["parseFor()"]
  bcf17edf_0894_6bd4_2cdd_7673387d389e["processFor()"]
  bcf17edf_0894_6bd4_2cdd_7673387d389e -->|calls| 6d44d030_dc81_8f72_dc49_6a6e930f99ab
  style 6d44d030_dc81_8f72_dc49_6a6e930f99ab 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
}

Subdomains

Called By

Frequently Asked Questions

What does parseFor() do?
parseFor() is a function in the vue codebase.
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