Home / Function/ renderAttr() — vue Function Reference

renderAttr() — vue Function Reference

Architecture documentation for the renderAttr() function in attrs.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  d3df2209_4d64_4591_abc3_5711006984d0["renderAttr()"]
  f549c274_b375_8785_e025_a5d238ba23a1["attrs.ts"]
  d3df2209_4d64_4591_abc3_5711006984d0 -->|defined in| f549c274_b375_8785_e025_a5d238ba23a1
  92fc9f25_c027_0fc7_6467_0fb55d262ccb["renderAttrs()"]
  92fc9f25_c027_0fc7_6467_0fb55d262ccb -->|calls| d3df2209_4d64_4591_abc3_5711006984d0
  a1a0cccb_4acb_283d_3bbd_291d8829d0a7["renderDOMProps()"]
  a1a0cccb_4acb_283d_3bbd_291d8829d0a7 -->|calls| d3df2209_4d64_4591_abc3_5711006984d0
  0dfeeed0_755a_0abd_c5dc_f0654ad8214f["renderAttrs()"]
  0dfeeed0_755a_0abd_c5dc_f0654ad8214f -->|calls| d3df2209_4d64_4591_abc3_5711006984d0
  eea1a423_22a6_affd_a3d8_e3cda0985def["renderDOMProps()"]
  eea1a423_22a6_affd_a3d8_e3cda0985def -->|calls| d3df2209_4d64_4591_abc3_5711006984d0
  4e8211dc_aa7e_481a_3002_b46e9e8afd4e["escape()"]
  d3df2209_4d64_4591_abc3_5711006984d0 -->|calls| 4e8211dc_aa7e_481a_3002_b46e9e8afd4e
  style d3df2209_4d64_4591_abc3_5711006984d0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/server-renderer/src/modules/attrs.ts lines 54–65

export function renderAttr(key: string, value: string): string {
  if (isBooleanAttr(key)) {
    if (!isFalsyAttrValue(value)) {
      return ` ${key}="${key}"`
    }
  } else if (isEnumeratedAttr(key)) {
    return ` ${key}="${escape(convertEnumeratedValue(key, value))}"`
  } else if (!isFalsyAttrValue(value)) {
    return ` ${key}="${escape(String(value))}"`
  }
  return ''
}

Subdomains

Calls

Frequently Asked Questions

What does renderAttr() do?
renderAttr() is a function in the vue codebase, defined in packages/server-renderer/src/modules/attrs.ts.
Where is renderAttr() defined?
renderAttr() is defined in packages/server-renderer/src/modules/attrs.ts at line 54.
What does renderAttr() call?
renderAttr() calls 1 function(s): escape.
What calls renderAttr()?
renderAttr() is called by 4 function(s): renderAttrs, renderAttrs, renderDOMProps, renderDOMProps.

Analyze Your Own Codebase

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

Try Supermodel Free