flattenSections() — supabase Function Reference
Architecture documentation for the flattenSections() function in helpers.ts from the supabase codebase.
Entity Profile
Relationship Graph
Source Code
apps/docs/internals/helpers.ts lines 1–15
export function flattenSections(sections: any[]): any[] {
let a: any[] = []
for (let i = 0; i < sections.length; i++) {
if (sections[i].id) {
// only push a section that has an id
// these are reserved for sidebar subtitles
a.push(sections[i])
}
if (sections[i].items) {
// if there are subitems, loop through
a = a.concat(flattenSections(sections[i].items))
}
}
return a
}
Domain
Subdomains
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free