Home / Function/ has() — astro Function Reference

has() — astro Function Reference

Architecture documentation for the has() function in slots.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  9edf48b2_00a8_f415_dc4e_dcdd75514521["has()"]
  39243d9c_ec83_60a3_c7ca_6ad834992ebb["Slots"]
  9edf48b2_00a8_f415_dc4e_dcdd75514521 -->|defined in| 39243d9c_ec83_60a3_c7ca_6ad834992ebb
  cac0efcf_85fe_9d2e_7466_f43eee3dc68d["render()"]
  cac0efcf_85fe_9d2e_7466_f43eee3dc68d -->|calls| 9edf48b2_00a8_f415_dc4e_dcdd75514521
  style 9edf48b2_00a8_f415_dc4e_dcdd75514521 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/core/render/slots.ts lines 44–47

	public has(name: string) {
		if (!this.#slots) return false;
		return Boolean(this.#slots[name]);
	}

Domain

Subdomains

Called By

Frequently Asked Questions

What does has() do?
has() is a function in the astro codebase, defined in packages/astro/src/core/render/slots.ts.
Where is has() defined?
has() is defined in packages/astro/src/core/render/slots.ts at line 44.
What calls has()?
has() is called by 1 function(s): render.

Analyze Your Own Codebase

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

Try Supermodel Free