Home / Function/ keyFor() — astro Function Reference

keyFor() — astro Function Reference

Architecture documentation for the keyFor() function in node.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  fbbb585c_fdc0_b9cd_1fbf_07460f90c0bc["keyFor()"]
  cb45fbc5_a108_7969_b027_ddb8eab65943["node.ts"]
  fbbb585c_fdc0_b9cd_1fbf_07460f90c0bc -->|defined in| cb45fbc5_a108_7969_b027_ddb8eab65943
  609d5d31_892d_f263_3e18_9f1fa7712cd0["handleSvgDeduplication()"]
  609d5d31_892d_f263_3e18_9f1fa7712cd0 -->|calls| fbbb585c_fdc0_b9cd_1fbf_07460f90c0bc
  style fbbb585c_fdc0_b9cd_1fbf_07460f90c0bc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/assets/utils/node.ts lines 23–30

function keyFor(hash: string): SvgCacheKey {
	let key = keyRegistry.get(hash);
	if (!key) {
		key = { hash };
		keyRegistry.set(hash, key);
	}
	return key;
}

Domain

Subdomains

Frequently Asked Questions

What does keyFor() do?
keyFor() is a function in the astro codebase, defined in packages/astro/src/assets/utils/node.ts.
Where is keyFor() defined?
keyFor() is defined in packages/astro/src/assets/utils/node.ts at line 23.
What calls keyFor()?
keyFor() is called by 1 function(s): handleSvgDeduplication.

Analyze Your Own Codebase

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

Try Supermodel Free