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
  6c24453d_a369_3c36_0c49_b9e3d7e8f056["normalizeValue()"]
  9ebd262e_02c0_2bf3_c67d_fa9e59f467c5["style.ts"]
  6c24453d_a369_3c36_0c49_b9e3d7e8f056 -->|defined in| 9ebd262e_02c0_2bf3_c67d_fa9e59f467c5
  cecba13f_5a10_116b_812c_1e81cf0003da["genStyle()"]
  cecba13f_5a10_116b_812c_1e81cf0003da -->|calls| 6c24453d_a369_3c36_0c49_b9e3d7e8f056
  style 6c24453d_a369_3c36_0c49_b9e3d7e8f056 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