Home / Function/ parse_tag_attributes() — svelte Function Reference

parse_tag_attributes() — svelte Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  082d508a_e627_7a95_fce0_02014a5b6784["parse_tag_attributes()"]
  ccf6927a_1f1b_1dda_8616_80903a72ba16["index.js"]
  082d508a_e627_7a95_fce0_02014a5b6784 -->|defined in| ccf6927a_1f1b_1dda_8616_80903a72ba16
  3d6e4414_b36d_fff0_63de_9aea1fab6869["process_tag()"]
  3d6e4414_b36d_fff0_63de_9aea1fab6869 -->|calls| 082d508a_e627_7a95_fce0_02014a5b6784
  style 082d508a_e627_7a95_fce0_02014a5b6784 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/compiler/preprocess/index.js lines 223–236

function parse_tag_attributes(str) {
	/** @type {Record<string, string | boolean>} */
	const attrs = {};

	/** @type {RegExpMatchArray | null} */
	let match;
	while ((match = attribute_pattern.exec(str)) !== null) {
		const name = match[1];
		const value = match[2] || match[3] || match[4];
		attrs[name] = !value || value;
	}

	return attrs;
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does parse_tag_attributes() do?
parse_tag_attributes() is a function in the svelte codebase, defined in packages/svelte/src/compiler/preprocess/index.js.
Where is parse_tag_attributes() defined?
parse_tag_attributes() is defined in packages/svelte/src/compiler/preprocess/index.js at line 223.
What calls parse_tag_attributes()?
parse_tag_attributes() is called by 1 function(s): process_tag.

Analyze Your Own Codebase

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

Try Supermodel Free