sanitize_slots() — svelte Function Reference
Architecture documentation for the sanitize_slots() function in slot.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD 3275d914_8e9e_478d_ffdd_a2f570dbeb35["sanitize_slots()"] 2537b828_1113_c3e6_b7bf_1ee136abf18f["slot.js"] 3275d914_8e9e_478d_ffdd_a2f570dbeb35 -->|defined in| 2537b828_1113_c3e6_b7bf_1ee136abf18f style 3275d914_8e9e_478d_ffdd_a2f570dbeb35 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/src/internal/client/dom/blocks/slot.js lines 36–44
export function sanitize_slots(props) {
/** @type {Record<string, boolean>} */
const sanitized = {};
if (props.children) sanitized.default = true;
for (const key in props.$$slots) {
sanitized[key] = true;
}
return sanitized;
}
Domain
Subdomains
Source
Frequently Asked Questions
What does sanitize_slots() do?
sanitize_slots() is a function in the svelte codebase, defined in packages/svelte/src/internal/client/dom/blocks/slot.js.
Where is sanitize_slots() defined?
sanitize_slots() is defined in packages/svelte/src/internal/client/dom/blocks/slot.js at line 36.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free