Home / Function/ fromModule() — astro Function Reference

fromModule() — astro Function Reference

Architecture documentation for the fromModule() function in mutable-data-store.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  9bdd2670_f40d_7389_5a7d_328dbdd3a93f["fromModule()"]
  ecb98618_124a_e276_dd98_561beaedc6ea["MutableDataStore"]
  9bdd2670_f40d_7389_5a7d_328dbdd3a93f -->|defined in| ecb98618_124a_e276_dd98_561beaedc6ea
  29d3d61f_52dd_6593_ded5_0d3ab95005c7["fromMap()"]
  9bdd2670_f40d_7389_5a7d_328dbdd3a93f -->|calls| 29d3d61f_52dd_6593_ded5_0d3ab95005c7
  style 9bdd2670_f40d_7389_5a7d_328dbdd3a93f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/content/mutable-data-store.ts lines 410–418

	static async fromModule() {
		try {
			// @ts-expect-error - this is a virtual module
			const data = await import('astro:data-layer-content');
			const map = devalue.unflatten(data.default);
			return MutableDataStore.fromMap(map);
		} catch {}
		return new MutableDataStore();
	}

Subdomains

Calls

Frequently Asked Questions

What does fromModule() do?
fromModule() is a function in the astro codebase, defined in packages/astro/src/content/mutable-data-store.ts.
Where is fromModule() defined?
fromModule() is defined in packages/astro/src/content/mutable-data-store.ts at line 410.
What does fromModule() call?
fromModule() calls 1 function(s): fromMap.

Analyze Your Own Codebase

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

Try Supermodel Free