Home / Function/ flattenCommonClientLibSections() — supabase Function Reference

flattenCommonClientLibSections() — supabase Function Reference

Architecture documentation for the flattenCommonClientLibSections() function in Reference.generated.script.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  86220fce_b7ec_5580_a5d9_938c3ed97a21["flattenCommonClientLibSections()"]
  c54513d8_ea67_94fc_f187_f9ae4cd2e3eb["writeSdkReferenceSections()"]
  c54513d8_ea67_94fc_f187_f9ae4cd2e3eb -->|calls| 86220fce_b7ec_5580_a5d9_938c3ed97a21
  b792f766_6907_0c0b_d971_437562bc23c4["writeCliReferenceSections()"]
  b792f766_6907_0c0b_d971_437562bc23c4 -->|calls| 86220fce_b7ec_5580_a5d9_938c3ed97a21
  eff95f24_f3b8_b5c3_e4a7_5dfa320c3c6f["writeApiReferenceSections()"]
  eff95f24_f3b8_b5c3_e4a7_5dfa320c3c6f -->|calls| 86220fce_b7ec_5580_a5d9_938c3ed97a21
  f9f2b457_8e93_ce1a_7a61_59c0fd35d747["writeSelfHostingReferenceSections()"]
  f9f2b457_8e93_ce1a_7a61_59c0fd35d747 -->|calls| 86220fce_b7ec_5580_a5d9_938c3ed97a21
  style 86220fce_b7ec_5580_a5d9_938c3ed97a21 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/docs/features/docs/Reference.generated.script.ts lines 143–156

export function flattenCommonClientLibSections(tree: Array<AbbrevApiReferenceSection>) {
  return tree.reduce((acc, elem) => {
    if ('items' in elem) {
      const prunedElem = { ...elem }
      delete prunedElem.items
      acc.push(prunedElem)
      acc.push(...flattenCommonClientLibSections(elem.items || []))
    } else {
      acc.push(elem)
    }

    return acc
  }, [] as Array<AbbrevApiReferenceSection>)
}

Subdomains

Frequently Asked Questions

What does flattenCommonClientLibSections() do?
flattenCommonClientLibSections() is a function in the supabase codebase.
What calls flattenCommonClientLibSections()?
flattenCommonClientLibSections() is called by 4 function(s): writeApiReferenceSections, writeCliReferenceSections, writeSdkReferenceSections, writeSelfHostingReferenceSections.

Analyze Your Own Codebase

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

Try Supermodel Free