Home / Function/ unescape() — tailwindcss Function Reference

unescape() — tailwindcss Function Reference

Architecture documentation for the unescape() function in escape.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  dfc91ad5_bcf3_d363_efd7_01a5223f7b74["unescape()"]
  e28f6b6c_be9a_6950_8075_180c1b66f0ea["escape.ts"]
  dfc91ad5_bcf3_d363_efd7_01a5223f7b74 -->|defined in| e28f6b6c_be9a_6950_8075_180c1b66f0ea
  d30151e4_eee8_a868_f516_c653088f4a03["createThemeFn()"]
  d30151e4_eee8_a868_f516_c653088f4a03 -->|calls| dfc91ad5_bcf3_d363_efd7_01a5223f7b74
  3970218d_3d6c_e455_87cc_45b4a094f0e9["parseCss()"]
  3970218d_3d6c_e455_87cc_45b4a094f0e9 -->|calls| dfc91ad5_bcf3_d363_efd7_01a5223f7b74
  dbf6b411_7522_4e41_ab49_f4e9c07a4751["getOptions()"]
  dbf6b411_7522_4e41_ab49_f4e9c07a4751 -->|calls| dfc91ad5_bcf3_d363_efd7_01a5223f7b74
  31c8f8e4_0e98_63f8_a45c_113e0f57308b["markUsedVariable()"]
  31c8f8e4_0e98_63f8_a45c_113e0f57308b -->|calls| dfc91ad5_bcf3_d363_efd7_01a5223f7b74
  style dfc91ad5_bcf3_d363_efd7_01a5223f7b74 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tailwindcss/src/utils/escape.ts lines 75–81

export function unescape(escaped: string) {
  return escaped.replace(/\\([\dA-Fa-f]{1,6}[\t\n\f\r ]?|[\S\s])/g, (match) => {
    return match.length > 2
      ? String.fromCodePoint(Number.parseInt(match.slice(1).trim(), 16))
      : match[1]
  })
}

Subdomains

Frequently Asked Questions

What does unescape() do?
unescape() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/utils/escape.ts.
Where is unescape() defined?
unescape() is defined in packages/tailwindcss/src/utils/escape.ts at line 75.
What calls unescape()?
unescape() is called by 4 function(s): createThemeFn, getOptions, markUsedVariable, parseCss.

Analyze Your Own Codebase

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

Try Supermodel Free