Home / Function/ set() — astro Function Reference

set() — astro Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  0387bc4c_3a64_034b_f25c_ea4d3808bd47["set()"]
  ecb98618_124a_e276_dd98_561beaedc6ea["MutableDataStore"]
  0387bc4c_3a64_034b_f25c_ea4d3808bd47 -->|defined in| ecb98618_124a_e276_dd98_561beaedc6ea
  3a21f321_74af_4ffd_6753_e5d73c2415a9["addModuleImport()"]
  3a21f321_74af_4ffd_6753_e5d73c2415a9 -->|calls| 0387bc4c_3a64_034b_f25c_ea4d3808bd47
  f03b05d5_a06a_1438_1154_d1d6dcdbbdb9["scopedStore()"]
  f03b05d5_a06a_1438_1154_d1d6dcdbbdb9 -->|calls| 0387bc4c_3a64_034b_f25c_ea4d3808bd47
  6b11ff6e_f913_32c0_d605_318d04c32b6b["metaStore()"]
  6b11ff6e_f913_32c0_d605_318d04c32b6b -->|calls| 0387bc4c_3a64_034b_f25c_ea4d3808bd47
  style 0387bc4c_3a64_034b_f25c_ea4d3808bd47 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/content/mutable-data-store.ts lines 38–43

	set(collectionName: string, key: string, value: unknown) {
		const collection = this._collections.get(collectionName) ?? new Map();
		collection.set(String(key), value);
		this._collections.set(collectionName, collection);
		this.#saveToDiskDebounced();
	}

Subdomains

Frequently Asked Questions

What does set() do?
set() is a function in the astro codebase, defined in packages/astro/src/content/mutable-data-store.ts.
Where is set() defined?
set() is defined in packages/astro/src/content/mutable-data-store.ts at line 38.
What calls set()?
set() is called by 3 function(s): addModuleImport, metaStore, scopedStore.

Analyze Your Own Codebase

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

Try Supermodel Free