Home / Function/ hasContentFlag() — astro Function Reference

hasContentFlag() — astro Function Reference

Architecture documentation for the hasContentFlag() function in utils.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  5295aae7_4f87_4ddc_9a7e_ca3e7cdeb06b["hasContentFlag()"]
  7a09e708_c090_71c0_8138_7343699b1865["utils.ts"]
  5295aae7_4f87_4ddc_9a7e_ca3e7cdeb06b -->|defined in| 7a09e708_c090_71c0_8138_7343699b1865
  style 5295aae7_4f87_4ddc_9a7e_ca3e7cdeb06b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/content/utils.ts lines 483–486

export function hasContentFlag(viteId: string, flag: (typeof CONTENT_FLAGS)[number]): boolean {
	const flags = new URLSearchParams(viteId.split('?')[1] ?? '');
	return flags.has(flag);
}

Subdomains

Frequently Asked Questions

What does hasContentFlag() do?
hasContentFlag() is a function in the astro codebase, defined in packages/astro/src/content/utils.ts.
Where is hasContentFlag() defined?
hasContentFlag() is defined in packages/astro/src/content/utils.ts at line 483.

Analyze Your Own Codebase

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

Try Supermodel Free