Home / Function/ sanitize_slots() — svelte Function Reference

sanitize_slots() — svelte Function Reference

Architecture documentation for the sanitize_slots() function in index.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  0755171f_27cc_268c_448e_f20e9dd19877["sanitize_slots()"]
  1c4bc493_24af_177e_7307_a999997aceac["index.js"]
  0755171f_27cc_268c_448e_f20e9dd19877 -->|defined in| 1c4bc493_24af_177e_7307_a999997aceac
  style 0755171f_27cc_268c_448e_f20e9dd19877 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/internal/server/index.js lines 362–370

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

Frequently Asked Questions

What does sanitize_slots() do?
sanitize_slots() is a function in the svelte codebase, defined in packages/svelte/src/internal/server/index.js.
Where is sanitize_slots() defined?
sanitize_slots() is defined in packages/svelte/src/internal/server/index.js at line 362.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free