Home / Function/ eventuallyUnquote() — tailwindcss Function Reference

eventuallyUnquote() — tailwindcss Function Reference

Architecture documentation for the eventuallyUnquote() function in migrate-preflight.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  e8898d86_b380_e0ab_d884_65fc28945d60["eventuallyUnquote()"]
  4ccbfbad_b80c_422a_38fe_dc35ee118e8d["migrate-preflight.ts"]
  e8898d86_b380_e0ab_d884_65fc28945d60 -->|defined in| 4ccbfbad_b80c_422a_38fe_dc35ee118e8d
  ef07d6e3_0c3a_4722_5511_8d4759b3f570["substituteFunctionsInValue()"]
  ef07d6e3_0c3a_4722_5511_8d4759b3f570 -->|calls| e8898d86_b380_e0ab_d884_65fc28945d60
  style e8898d86_b380_e0ab_d884_65fc28945d60 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/@tailwindcss-upgrade/src/codemods/css/migrate-preflight.ts lines 166–184

function eventuallyUnquote(value: string) {
  if (value[0] !== "'" && value[0] !== '"') return value

  let unquoted = ''
  let quoteChar = value[0]
  for (let i = 1; i < value.length - 1; i++) {
    let currentChar = value[i]
    let nextChar = value[i + 1]

    if (currentChar === '\\' && (nextChar === quoteChar || nextChar === '\\')) {
      unquoted += nextChar
      i++
    } else {
      unquoted += currentChar
    }
  }

  return unquoted
}

Subdomains

Frequently Asked Questions

What does eventuallyUnquote() do?
eventuallyUnquote() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-upgrade/src/codemods/css/migrate-preflight.ts.
Where is eventuallyUnquote() defined?
eventuallyUnquote() is defined in packages/@tailwindcss-upgrade/src/codemods/css/migrate-preflight.ts at line 166.
What calls eventuallyUnquote()?
eventuallyUnquote() is called by 1 function(s): substituteFunctionsInValue.

Analyze Your Own Codebase

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

Try Supermodel Free