Home / Function/ decodeArbitraryValue() — tailwindcss Function Reference

decodeArbitraryValue() — tailwindcss Function Reference

Architecture documentation for the decodeArbitraryValue() function in decode-arbitrary-value.ts from the tailwindcss codebase.

Function typescript Oxide Extractor calls 5 called by 3

Entity Profile

Dependency Diagram

graph TD
  8e4634e2_7c1f_b6c1_18b2_bd8f97be3651["decodeArbitraryValue()"]
  7df4d001_f01e_1e05_13ee_91edb05bf1f8["decode-arbitrary-value.ts"]
  8e4634e2_7c1f_b6c1_18b2_bd8f97be3651 -->|defined in| 7df4d001_f01e_1e05_13ee_91edb05bf1f8
  7d328a86_10c6_b5c1_6390_36f4fffe9c14["parseCandidate()"]
  7d328a86_10c6_b5c1_6390_36f4fffe9c14 -->|calls| 8e4634e2_7c1f_b6c1_18b2_bd8f97be3651
  ee401cf1_8419_7e3d_fd95_c624f65c3dba["parseModifier()"]
  ee401cf1_8419_7e3d_fd95_c624f65c3dba -->|calls| 8e4634e2_7c1f_b6c1_18b2_bd8f97be3651
  5719096b_0f51_ab16_7fbd_4455f835804c["parseVariant()"]
  5719096b_0f51_ab16_7fbd_4455f835804c -->|calls| 8e4634e2_7c1f_b6c1_18b2_bd8f97be3651
  c54f6c32_7c33_b742_3596_7fd430089201["convertUnderscoresToWhitespace()"]
  8e4634e2_7c1f_b6c1_18b2_bd8f97be3651 -->|calls| c54f6c32_7c33_b742_3596_7fd430089201
  49a8c506_c50e_ed4b_5a0e_0393edae2b6f["parse()"]
  8e4634e2_7c1f_b6c1_18b2_bd8f97be3651 -->|calls| 49a8c506_c50e_ed4b_5a0e_0393edae2b6f
  d07c9a91_e1f5_792b_d5fc_9e0b6aeb8601["recursivelyDecodeArbitraryValues()"]
  8e4634e2_7c1f_b6c1_18b2_bd8f97be3651 -->|calls| d07c9a91_e1f5_792b_d5fc_9e0b6aeb8601
  d6cf80a6_8130_7069_e60d_09156f156b67["toCss()"]
  8e4634e2_7c1f_b6c1_18b2_bd8f97be3651 -->|calls| d6cf80a6_8130_7069_e60d_09156f156b67
  6297163c_7d9c_1e1c_ddff_20f6098d38f6["addWhitespaceAroundMathOperators()"]
  8e4634e2_7c1f_b6c1_18b2_bd8f97be3651 -->|calls| 6297163c_7d9c_1e1c_ddff_20f6098d38f6
  style 8e4634e2_7c1f_b6c1_18b2_bd8f97be3651 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tailwindcss/src/utils/decode-arbitrary-value.ts lines 4–17

export function decodeArbitraryValue(input: string): string {
  // There are definitely no functions in the input, so bail early
  if (input.indexOf('(') === -1) {
    return convertUnderscoresToWhitespace(input)
  }

  let ast = ValueParser.parse(input)
  recursivelyDecodeArbitraryValues(ast)
  input = ValueParser.toCss(ast)

  input = addWhitespaceAroundMathOperators(input)

  return input
}

Domain

Subdomains

Frequently Asked Questions

What does decodeArbitraryValue() do?
decodeArbitraryValue() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/utils/decode-arbitrary-value.ts.
Where is decodeArbitraryValue() defined?
decodeArbitraryValue() is defined in packages/tailwindcss/src/utils/decode-arbitrary-value.ts at line 4.
What does decodeArbitraryValue() call?
decodeArbitraryValue() calls 5 function(s): addWhitespaceAroundMathOperators, convertUnderscoresToWhitespace, parse, recursivelyDecodeArbitraryValues, toCss.
What calls decodeArbitraryValue()?
decodeArbitraryValue() is called by 3 function(s): parseCandidate, parseModifier, parseVariant.

Analyze Your Own Codebase

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

Try Supermodel Free