Home / Function/ match_schema() — svelte Function Reference

match_schema() — svelte Function Reference

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

Function javascript Compiler Transformer calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  b14dcacc_fb2b_ff77_8493_b1455d450093["match_schema()"]
  b389a21f_6de7_2a41_34f3_8efbf9045c9c["index.js"]
  b14dcacc_fb2b_ff77_8493_b1455d450093 -->|defined in| b389a21f_6de7_2a41_34f3_8efbf9045c9c
  19a2c9c9_f65f_d13c_f2f7_516470ef8d7c["element_interactivity()"]
  19a2c9c9_f65f_d13c_f2f7_516470ef8d7c -->|calls| b14dcacc_fb2b_ff77_8493_b1455d450093
  82c454e1_d40e_f288_e9f9_3476ef8e8419["get()"]
  b14dcacc_fb2b_ff77_8493_b1455d450093 -->|calls| 82c454e1_d40e_f288_e9f9_3476ef8e8419
  09250a77_9dca_fc69_beb4_75e85845d9e8["get_static_text_value()"]
  b14dcacc_fb2b_ff77_8493_b1455d450093 -->|calls| 09250a77_9dca_fc69_beb4_75e85845d9e8
  style b14dcacc_fb2b_ff77_8493_b1455d450093 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/compiler/phases/2-analyze/visitors/shared/a11y/index.js lines 858–869

function match_schema(schema, tag_name, attribute_map) {
	if (schema.name !== tag_name) return false;
	if (!schema.attributes) return true;
	return schema.attributes.every((schema_attribute) => {
		const attribute = attribute_map.get(schema_attribute.name);
		if (!attribute) return false;
		if (schema_attribute.value && schema_attribute.value !== get_static_text_value(attribute)) {
			return false;
		}
		return true;
	});
}

Domain

Subdomains

Frequently Asked Questions

What does match_schema() do?
match_schema() is a function in the svelte codebase, defined in packages/svelte/src/compiler/phases/2-analyze/visitors/shared/a11y/index.js.
Where is match_schema() defined?
match_schema() is defined in packages/svelte/src/compiler/phases/2-analyze/visitors/shared/a11y/index.js at line 858.
What does match_schema() call?
match_schema() calls 2 function(s): get, get_static_text_value.
What calls match_schema()?
match_schema() is called by 1 function(s): element_interactivity.

Analyze Your Own Codebase

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

Try Supermodel Free