Home / Function/ getBaseForStyle() — ui Function Reference

getBaseForStyle() — ui Function Reference

Architecture documentation for the getBaseForStyle() function in rehype.ts from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  9d8bdcac_10b0_e037_824e_790a734fe5aa["getBaseForStyle()"]
  e2427336_4794_0f1c_982a_f2089ffcec85["rehype.ts"]
  9d8bdcac_10b0_e037_824e_790a734fe5aa -->|defined in| e2427336_4794_0f1c_982a_f2089ffcec85
  39c6b506_a59e_3c5f_e2db_d7c56a400c96["getDemoFilePath()"]
  39c6b506_a59e_3c5f_e2db_d7c56a400c96 -->|calls| 9d8bdcac_10b0_e037_824e_790a734fe5aa
  0cf50cf3_9378_48fd_056f_6d1b412973ab["getIndexForStyle()"]
  0cf50cf3_9378_48fd_056f_6d1b412973ab -->|calls| 9d8bdcac_10b0_e037_824e_790a734fe5aa
  style 9d8bdcac_10b0_e037_824e_790a734fe5aa fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/lib/rehype.ts lines 20–27

function getBaseForStyle(styleName: string) {
  for (const base of BASES) {
    if (styleName.startsWith(`${base.name}-`)) {
      return base.name
    }
  }
  return null
}

Subdomains

Frequently Asked Questions

What does getBaseForStyle() do?
getBaseForStyle() is a function in the ui codebase, defined in apps/v4/lib/rehype.ts.
Where is getBaseForStyle() defined?
getBaseForStyle() is defined in apps/v4/lib/rehype.ts at line 20.
What calls getBaseForStyle()?
getBaseForStyle() is called by 2 function(s): getDemoFilePath, getIndexForStyle.

Analyze Your Own Codebase

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

Try Supermodel Free