Home / Function/ normalizeValue() — vue Function Reference

normalizeValue() — vue Function Reference

Architecture documentation for the normalizeValue() function in style.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  6b3821dd_93e5_a30c_8490_6e12f6198283["normalizeValue()"]
  1bba1212_b24c_b9c5_98d6_faf10821140f["style.ts"]
  6b3821dd_93e5_a30c_8490_6e12f6198283 -->|defined in| 1bba1212_b24c_b9c5_98d6_faf10821140f
  7b8fbb0d_6625_f705_64a4_334409494e27["genStyle()"]
  7b8fbb0d_6625_f705_64a4_334409494e27 -->|calls| 6b3821dd_93e5_a30c_8490_6e12f6198283
  style 6b3821dd_93e5_a30c_8490_6e12f6198283 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/server-renderer/src/modules/style.ts lines 22–33

function normalizeValue(key: string, value: any): string {
  if (
    typeof value === 'string' ||
    (typeof value === 'number' && noUnitNumericStyleProps[key]) ||
    value === 0
  ) {
    return `${key}:${value};`
  } else {
    // invalid values
    return ``
  }
}

Subdomains

Called By

Frequently Asked Questions

What does normalizeValue() do?
normalizeValue() is a function in the vue codebase, defined in packages/server-renderer/src/modules/style.ts.
Where is normalizeValue() defined?
normalizeValue() is defined in packages/server-renderer/src/modules/style.ts at line 22.
What calls normalizeValue()?
normalizeValue() is called by 1 function(s): genStyle.

Analyze Your Own Codebase

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

Try Supermodel Free