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
  5132a03f_9cf9_9bd0_f54c_d0754bee76a1["hasMathFn()"]
  4b2a86ff_1bb4_7b95_cc68_25f1de6a584b["isNumber()"]
  4b2a86ff_1bb4_7b95_cc68_25f1de6a584b -->|calls| 5132a03f_9cf9_9bd0_f54c_d0754bee76a1
  94b3e523_3675_a597_3668_598a53b432d1["isPercentage()"]
  94b3e523_3675_a597_3668_598a53b432d1 -->|calls| 5132a03f_9cf9_9bd0_f54c_d0754bee76a1
  7227c546_a3c3_bab2_3a03_9d4e23c28a03["isFraction()"]
  7227c546_a3c3_bab2_3a03_9d4e23c28a03 -->|calls| 5132a03f_9cf9_9bd0_f54c_d0754bee76a1
  f09c1b77_2ead_f9c9_7d05_4f8bab47f7ca["isLength()"]
  f09c1b77_2ead_f9c9_7d05_4f8bab47f7ca -->|calls| 5132a03f_9cf9_9bd0_f54c_d0754bee76a1
  style 5132a03f_9cf9_9bd0_f54c_d0754bee76a1 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}(`))
}

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