Home / Function/ createSectionKey() — tailwindcss Function Reference

createSectionKey() — tailwindcss Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  36a174f5_8af8_ad9e_a3e2_7f8dd1ed3d11["createSectionKey()"]
  0e91912d_5423_6991_60b0_8afbca30e459["migrateTheme()"]
  0e91912d_5423_6991_60b0_8afbca30e459 -->|calls| 36a174f5_8af8_ad9e_a3e2_7f8dd1ed3d11
  style 36a174f5_8af8_ad9e_a3e2_7f8dd1ed3d11 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/@tailwindcss-upgrade/src/codemods/config/migrate-js-config.ts lines 328–339

function createSectionKey(key: string[]): string {
  let sectionSegments = []
  for (let i = 0; i < key.length - 1; i++) {
    let segment = key[i]
    // Ignore tuples
    if (key[i + 1][0] === '-') {
      break
    }
    sectionSegments.push(segment)
  }
  return sectionSegments.join('-')
}

Subdomains

Called By

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free