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
  b7ebd27e_3e88_f634_9bc0_c44770718214["normalizeValue()"]
  eabb9457_0741_a2c4_0cfc_562a8bb2bdb4["genStyle()"]
  eabb9457_0741_a2c4_0cfc_562a8bb2bdb4 -->|calls| b7ebd27e_3e88_f634_9bc0_c44770718214
  style b7ebd27e_3e88_f634_9bc0_c44770718214 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