flattenSections() — supabase Function Reference
Architecture documentation for the flattenSections() function in validate-references.ts from the supabase codebase.
Entity Profile
Relationship Graph
Source Code
apps/docs/scripts/validate-references.ts lines 32–53
function flattenSections(sections: Section[]): { functions: string[]; groups: string[] } {
const functions: string[] = []
const groups: string[] = []
function recurse(items: Section[]) {
for (const item of items) {
if (item.type === 'function' && item.id) {
if (item.isFunc === false) {
groups.push(item.id)
} else {
functions.push(item.id)
}
}
if (item.items) {
recurse(item.items)
}
}
}
recurse(sections)
return { functions, groups }
}
Domain
Subdomains
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free