isTruthyMdxAttribute() — ui Function Reference
Architecture documentation for the isTruthyMdxAttribute() function in rehype.ts from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 119c6b5c_bc35_7a40_fe79_251b089a2a68["isTruthyMdxAttribute()"] e2427336_4794_0f1c_982a_f2089ffcec85["rehype.ts"] 119c6b5c_bc35_7a40_fe79_251b089a2a68 -->|defined in| e2427336_4794_0f1c_982a_f2089ffcec85 d0e9b290_610b_ba71_e7bb_ceeef3917003["rehypeComponent()"] d0e9b290_610b_ba71_e7bb_ceeef3917003 -->|calls| 119c6b5c_bc35_7a40_fe79_251b089a2a68 style 119c6b5c_bc35_7a40_fe79_251b089a2a68 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/lib/rehype.ts lines 307–322
function isTruthyMdxAttribute(
attribute?: {
value?: unknown
} | null
) {
if (!attribute) return false
if (!("value" in attribute)) return true
const { value } = attribute
if (value === undefined || value === null) return true
if (typeof value === "boolean") return value
if (typeof value === "string") return value !== "false"
return Boolean(value)
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does isTruthyMdxAttribute() do?
isTruthyMdxAttribute() is a function in the ui codebase, defined in apps/v4/lib/rehype.ts.
Where is isTruthyMdxAttribute() defined?
isTruthyMdxAttribute() is defined in apps/v4/lib/rehype.ts at line 307.
What calls isTruthyMdxAttribute()?
isTruthyMdxAttribute() is called by 1 function(s): rehypeComponent.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free