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
  c260a9e4_06cd_ea93_4033_f7c38224e180["normalizeValue()"]
  e9dcbd63_d9db_8c20_c04c_3eafe4d27b15["genStyle()"]
  e9dcbd63_d9db_8c20_c04c_3eafe4d27b15 -->|calls| c260a9e4_06cd_ea93_4033_f7c38224e180
  style c260a9e4_06cd_ea93_4033_f7c38224e180 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.
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