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
  585e2570_70ea_9c34_2ea1_950e5cc89977["createSectionKey()"]
  77d1d37f_6021_dc8c_6d04_0c3b07e3ad19["migrateTheme()"]
  77d1d37f_6021_dc8c_6d04_0c3b07e3ad19 -->|calls| 585e2570_70ea_9c34_2ea1_950e5cc89977
  style 585e2570_70ea_9c34_2ea1_950e5cc89977 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('-')
}

Domain

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