getVariables() — supabase Function Reference
Architecture documentation for the getVariables() function in Partial.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD fd8b0bf3_f6b1_8cf9_1a51_2735ab221d01["getVariables()"] e4dca78c_a009_9457_9893_c32a01231d09["fetchPartialsContent()"] e4dca78c_a009_9457_9893_c32a01231d09 -->|calls| fd8b0bf3_f6b1_8cf9_1a51_2735ab221d01 9ff1763e_9377_474c_84fd_ebadabfa99e4["getAttributeValueExpression()"] fd8b0bf3_f6b1_8cf9_1a51_2735ab221d01 -->|calls| 9ff1763e_9377_474c_84fd_ebadabfa99e4 790ab825_fd72_cafc_9ee2_d8f5b37c7cf2["getAttributeValue()"] fd8b0bf3_f6b1_8cf9_1a51_2735ab221d01 -->|calls| 790ab825_fd72_cafc_9ee2_d8f5b37c7cf2 style fd8b0bf3_f6b1_8cf9_1a51_2735ab221d01 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/docs/features/directives/Partial.ts lines 141–158
function getVariables(node: MdxJsxFlowElement): undefined | Record<string, string> {
const variables = getAttributeValueExpression(getAttributeValue(node, 'variables'))
if (variables === undefined) {
return
}
try {
const parsed = JSON.parse(variables)
for (const value of Object.values(parsed)) {
if (typeof value !== 'string') {
throw new Error('Only string values are allowed')
}
}
return parsed
} catch {
throw new Error('Invalid $Partial variables: must be valid JSON containing only string values')
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does getVariables() do?
getVariables() is a function in the supabase codebase.
What does getVariables() call?
getVariables() calls 2 function(s): getAttributeValue, getAttributeValueExpression.
What calls getVariables()?
getVariables() is called by 1 function(s): fetchPartialsContent.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free