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
  2ebaec7d_7a69_9be4_2789_8f5a6ea3a2f4["splitNumberAndUnit()"]
  b2ba3368_7330_fe20_4543_9cafa8cfedc0["migrate-js-config.ts"]
  2ebaec7d_7a69_9be4_2789_8f5a6ea3a2f4 -->|defined in| b2ba3368_7330_fe20_4543_9cafa8cfedc0
  b28200b3_b5d3_7858_38e3_b07a399f3495["removeUnnecessarySpacingKeys()"]
  b28200b3_b5d3_7858_38e3_b07a399f3495 -->|calls| 2ebaec7d_7a69_9be4_2789_8f5a6ea3a2f4
  style 2ebaec7d_7a69_9be4_2789_8f5a6ea3a2f4 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, defined in packages/@tailwindcss-upgrade/src/codemods/config/migrate-js-config.ts.
Where is splitNumberAndUnit() defined?
splitNumberAndUnit() is defined in packages/@tailwindcss-upgrade/src/codemods/config/migrate-js-config.ts at line 547.
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