Home / Function/ has() — astro Function Reference

has() — astro Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  1551fb1a_2da2_076e_a109_11b4fd0f31b9["has()"]
  ac7e948d_1024_ae45_2ea1_742b83aa21b5["ImmutableDataStore"]
  1551fb1a_2da2_076e_a109_11b4fd0f31b9 -->|defined in| ac7e948d_1024_ae45_2ea1_742b83aa21b5
  55253886_f348_abb0_c589_11025f6f6a76["hasCollection()"]
  55253886_f348_abb0_c589_11025f6f6a76 -->|calls| 1551fb1a_2da2_076e_a109_11b4fd0f31b9
  3b90745d_78ea_8543_7f62_501ddedc7a8d["get()"]
  1551fb1a_2da2_076e_a109_11b4fd0f31b9 -->|calls| 3b90745d_78ea_8543_7f62_501ddedc7a8d
  style 1551fb1a_2da2_076e_a109_11b4fd0f31b9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/content/data-store.ts lines 70–76

	has(collectionName: string, key: string) {
		const collection = this._collections.get(collectionName);
		if (collection) {
			return collection.has(String(key));
		}
		return false;
	}

Subdomains

Calls

Called By

Frequently Asked Questions

What does has() do?
has() is a function in the astro codebase, defined in packages/astro/src/content/data-store.ts.
Where is has() defined?
has() is defined in packages/astro/src/content/data-store.ts at line 70.
What does has() call?
has() calls 1 function(s): get.
What calls has()?
has() is called by 1 function(s): hasCollection.

Analyze Your Own Codebase

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

Try Supermodel Free