Home / Function/ splitNumberAndUnit() — tailwindcss Function Reference

splitNumberAndUnit() — tailwindcss Function Reference

Architecture documentation for the splitNumberAndUnit() function in migrate-js-config.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  7e81974c_f982_608e_d073_bc944851a369["splitNumberAndUnit()"]
  c8623640_b79b_0216_79ed_a099482fb629["removeUnnecessarySpacingKeys()"]
  c8623640_b79b_0216_79ed_a099482fb629 -->|calls| 7e81974c_f982_608e_d073_bc944851a369
  style 7e81974c_f982_608e_d073_bc944851a369 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/@tailwindcss-upgrade/src/codemods/config/migrate-js-config.ts lines 547–553

function splitNumberAndUnit(value: string): [string, string] | [null, null] {
  let match = value.match(/^([0-9.]+)(.*)$/)
  if (!match) {
    return [null, null]
  }
  return [match[1], match[2]]
}

Subdomains

Frequently Asked Questions

What does splitNumberAndUnit() do?
splitNumberAndUnit() is a function in the tailwindcss codebase.
What calls splitNumberAndUnit()?
splitNumberAndUnit() is called by 1 function(s): removeUnnecessarySpacingKeys.

Analyze Your Own Codebase

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

Try Supermodel Free