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
  114414be_c3a5_962f_2457_d506e19d5c72["hasMathFn()"]
  b1d3acc2_87a0_1dc7_89cb_99caa3a5fac1["isNumber()"]
  b1d3acc2_87a0_1dc7_89cb_99caa3a5fac1 -->|calls| 114414be_c3a5_962f_2457_d506e19d5c72
  2e575c10_95fb_8398_4a75_13426712ebeb["isPercentage()"]
  2e575c10_95fb_8398_4a75_13426712ebeb -->|calls| 114414be_c3a5_962f_2457_d506e19d5c72
  c24c42b1_20b0_9724_5879_a83594e8c259["isFraction()"]
  c24c42b1_20b0_9724_5879_a83594e8c259 -->|calls| 114414be_c3a5_962f_2457_d506e19d5c72
  b165f745_465e_eff8_6d0d_8cc7925672fb["isLength()"]
  b165f745_465e_eff8_6d0d_8cc7925672fb -->|calls| 114414be_c3a5_962f_2457_d506e19d5c72
  style 114414be_c3a5_962f_2457_d506e19d5c72 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.
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