Home / Function/ normalize_warning() — svelte Function Reference

normalize_warning() — svelte Function Reference

Architecture documentation for the normalize_warning() function in test.ts from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  0af4706f_8240_76c7_ae8a_f59e937fc796["normalize_warning()"]
  56007373_5cb4_276b_8066_2e61ad5747d2["test.ts"]
  0af4706f_8240_76c7_ae8a_f59e937fc796 -->|defined in| 56007373_5cb4_276b_8066_2e61ad5747d2
  style 0af4706f_8240_76c7_ae8a_f59e937fc796 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/tests/css/test.ts lines 11–24

function normalize_warning(warning: Warning) {
	delete warning.filename;
	delete warning.position;
	delete warning.frame;

	// Remove the "https://svelte.dev/e/..." link at the end
	const lines = warning.message.split('\n');
	if (lines.at(-1)?.startsWith('https://svelte.dev/e/')) {
		lines.pop();
	}
	warning.message = lines.join('\n');

	return warning;
}

Domain

Subdomains

Frequently Asked Questions

What does normalize_warning() do?
normalize_warning() is a function in the svelte codebase, defined in packages/svelte/tests/css/test.ts.
Where is normalize_warning() defined?
normalize_warning() is defined in packages/svelte/tests/css/test.ts at line 11.

Analyze Your Own Codebase

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

Try Supermodel Free