slot.js — svelte Source File
Architecture documentation for slot.js, a javascript file in the svelte codebase. 4 imports, 3 dependents.
Entity Profile
Dependency Diagram
graph LR 087a1de5_6350_4c2b_e177_479d75ba0608["slot.js"] bbca3d2a_42c8_b215_d3b5_5077ccaf0797["nodes.js"] 087a1de5_6350_4c2b_e177_479d75ba0608 --> bbca3d2a_42c8_b215_d3b5_5077ccaf0797 313a36c6_761f_13b2_e8d6_c0f84cd81a9a["is_element_node"] 087a1de5_6350_4c2b_e177_479d75ba0608 --> 313a36c6_761f_13b2_e8d6_c0f84cd81a9a 0c5c28a7_226d_4e7c_e75e_0853c0a9fc2c["ast.js"] 087a1de5_6350_4c2b_e177_479d75ba0608 --> 0c5c28a7_226d_4e7c_e75e_0853c0a9fc2c 653284b2_68fd_eee3_0064_918a4c065d4a["is_text_attribute"] 087a1de5_6350_4c2b_e177_479d75ba0608 --> 653284b2_68fd_eee3_0064_918a4c065d4a 057ad110_57ab_942c_4f8d_5c2f711bef54["component.js"] 057ad110_57ab_942c_4f8d_5c2f711bef54 --> 087a1de5_6350_4c2b_e177_479d75ba0608 be3a40b1_7e88_8a0c_e231_56c97bd7899f["component.js"] be3a40b1_7e88_8a0c_e231_56c97bd7899f --> 087a1de5_6350_4c2b_e177_479d75ba0608 ee93d8a6_6fde_b1c1_e15b_3a4da5326305["scope.js"] ee93d8a6_6fde_b1c1_e15b_3a4da5326305 --> 087a1de5_6350_4c2b_e177_479d75ba0608 style 087a1de5_6350_4c2b_e177_479d75ba0608 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/** @import { AST } from '#compiler' */
import { is_element_node } from '../phases/nodes.js';
import { is_text_attribute } from './ast.js';
/**
* @param {AST.SvelteNode} node
*/
export function determine_slot(node) {
if (!is_element_node(node)) return null;
for (const attribute of node.attributes) {
if (attribute.type !== 'Attribute') continue;
if (attribute.name !== 'slot') continue;
if (!is_text_attribute(attribute)) continue;
return /** @type {string} */ (attribute.value[0].data);
}
return null;
}
Domain
Subdomains
Functions
Dependencies
Imported By
Source
Frequently Asked Questions
What does slot.js do?
slot.js is a source file in the svelte codebase, written in javascript. It belongs to the Compiler domain, Transformer subdomain.
What functions are defined in slot.js?
slot.js defines 1 function(s): determine_slot.
What does slot.js depend on?
slot.js imports 4 module(s): ast.js, is_element_node, is_text_attribute, nodes.js.
What files import slot.js?
slot.js is imported by 3 file(s): component.js, component.js, scope.js.
Where is slot.js in the architecture?
slot.js is located at packages/svelte/src/compiler/utils/slot.js (domain: Compiler, subdomain: Transformer, directory: packages/svelte/src/compiler/utils).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free