Home / Function/ hasMathFn() — tailwindcss Function Reference

hasMathFn() — tailwindcss Function Reference

Architecture documentation for the hasMathFn() function in math-operators.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  f04c0be0_0d43_f281_8a03_6eeea7eb5f25["hasMathFn()"]
  49e6f0af_1e9c_a3fb_0227_698f6d66f3cc["math-operators.ts"]
  f04c0be0_0d43_f281_8a03_6eeea7eb5f25 -->|defined in| 49e6f0af_1e9c_a3fb_0227_698f6d66f3cc
  a83d8615_8f86_7357_a5df_f103f923c611["isNumber()"]
  a83d8615_8f86_7357_a5df_f103f923c611 -->|calls| f04c0be0_0d43_f281_8a03_6eeea7eb5f25
  62476965_f9ea_4906_7208_dd8bf9da2e20["isPercentage()"]
  62476965_f9ea_4906_7208_dd8bf9da2e20 -->|calls| f04c0be0_0d43_f281_8a03_6eeea7eb5f25
  82014e85_f1eb_498e_c7ba_f37a784ac17a["isFraction()"]
  82014e85_f1eb_498e_c7ba_f37a784ac17a -->|calls| f04c0be0_0d43_f281_8a03_6eeea7eb5f25
  978cd83c_b489_4dd0_bddf_ab7b6f0970c6["isLength()"]
  978cd83c_b489_4dd0_bddf_ab7b6f0970c6 -->|calls| f04c0be0_0d43_f281_8a03_6eeea7eb5f25
  style f04c0be0_0d43_f281_8a03_6eeea7eb5f25 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tailwindcss/src/utils/math-operators.ts lines 41–43

export function hasMathFn(input: string) {
  return input.indexOf('(') !== -1 && MATH_FUNCTIONS.some((fn) => input.includes(`${fn}(`))
}

Domain

Subdomains

Frequently Asked Questions

What does hasMathFn() do?
hasMathFn() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/utils/math-operators.ts.
Where is hasMathFn() defined?
hasMathFn() is defined in packages/tailwindcss/src/utils/math-operators.ts at line 41.
What calls hasMathFn()?
hasMathFn() is called by 4 function(s): isFraction, isLength, isNumber, isPercentage.

Analyze Your Own Codebase

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

Try Supermodel Free