nameCodeBlock() — supabase Function Reference
Architecture documentation for the nameCodeBlock() function in CodeTabs.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD 980d4412_8b58_ac59_575e_1d9c72e1d262["nameCodeBlock()"] 5ff6f4ae_9c54_d590_6f0e_af17d0a33505["rewriteNodes()"] 5ff6f4ae_9c54_d590_6f0e_af17d0a33505 -->|calls| 980d4412_8b58_ac59_575e_1d9c72e1d262 201adfd7_6e0b_66d0_7333_d08bbd028a7c["getFileName()"] 980d4412_8b58_ac59_575e_1d9c72e1d262 -->|calls| 201adfd7_6e0b_66d0_7333_d08bbd028a7c style 980d4412_8b58_ac59_575e_1d9c72e1d262 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/docs/features/directives/CodeTabs.ts lines 102–120
function nameCodeBlock(node: Code, ancestors: Array<Parent>) {
const file = getFileName(node)
if (!file) return
const parent = ancestors[ancestors.length - 1]
const codeBlockWrapper: MdxJsxFlowElement = {
type: 'mdxJsxFlowElement',
name: 'NamedCodeBlock',
attributes: [
{
type: 'mdxJsxAttribute',
name: 'name',
value: file,
},
],
children: [node],
}
parent.children.splice(parent.children.indexOf(node), 1, codeBlockWrapper)
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does nameCodeBlock() do?
nameCodeBlock() is a function in the supabase codebase.
What does nameCodeBlock() call?
nameCodeBlock() calls 1 function(s): getFileName.
What calls nameCodeBlock()?
nameCodeBlock() is called by 1 function(s): rewriteNodes.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free