Home / Function/ normalizeExpression() — vue Function Reference

normalizeExpression() — vue Function Reference

Architecture documentation for the normalizeExpression() function in cssVars.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  7f13dd4c_590f_8b12_3290_18226dd54156["normalizeExpression()"]
  b1640b15_d391_0cad_5859_5943e95998a9["parseCssVars()"]
  b1640b15_d391_0cad_5859_5943e95998a9 -->|calls| 7f13dd4c_590f_8b12_3290_18226dd54156
  6d0c1bb9_8891_e648_20f9_17e9dfeb6607["cssVarsPlugin()"]
  6d0c1bb9_8891_e648_20f9_17e9dfeb6607 -->|calls| 7f13dd4c_590f_8b12_3290_18226dd54156
  style 7f13dd4c_590f_8b12_3290_18226dd54156 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/compiler-sfc/src/cssVars.ts lines 30–39

function normalizeExpression(exp: string) {
  exp = exp.trim()
  if (
    (exp[0] === `'` && exp[exp.length - 1] === `'`) ||
    (exp[0] === `"` && exp[exp.length - 1] === `"`)
  ) {
    return exp.slice(1, -1)
  }
  return exp
}

Domain

Subdomains

Frequently Asked Questions

What does normalizeExpression() do?
normalizeExpression() is a function in the vue codebase.
What calls normalizeExpression()?
normalizeExpression() is called by 2 function(s): cssVarsPlugin, parseCssVars.

Analyze Your Own Codebase

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

Try Supermodel Free