Home / Function/ has() — astro Function Reference

has() — astro Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  0c4f30da_9c0f_13fa_b899_f09c97c9c0cc["has()"]
  28935751_f2b1_4797_d41a_fc616c40e0a8["AstroCookies"]
  0c4f30da_9c0f_13fa_b899_f09c97c9c0cc -->|defined in| 28935751_f2b1_4797_d41a_fc616c40e0a8
  f12348cf_2aaf_fe08_4139_53f1735dea1d["get()"]
  f12348cf_2aaf_fe08_4139_53f1735dea1d -->|calls| 0c4f30da_9c0f_13fa_b899_f09c97c9c0cc
  f12348cf_2aaf_fe08_4139_53f1735dea1d["get()"]
  0c4f30da_9c0f_13fa_b899_f09c97c9c0cc -->|calls| f12348cf_2aaf_fe08_4139_53f1735dea1d
  style 0c4f30da_9c0f_13fa_b899_f09c97c9c0cc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/core/cookies/cookies.ts lines 156–163

	has(key: string, _options?: AstroCookieGetOptions): boolean {
		if (this.#outgoing?.has(key)) {
			let [, , isSetValue] = this.#outgoing.get(key)!;
			return isSetValue;
		}
		const values = this.#ensureParsed();
		return values[key] !== undefined;
	}

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free