Home / Function/ countHydrationScripts() — astro Function Reference

countHydrationScripts() — astro Function Reference

Architecture documentation for the countHydrationScripts() function in solid-component.test.js from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  af090423_7c56_e0ef_aff3_60e138eda359["countHydrationScripts()"]
  3ca6ecbf_cbec_c92e_be6f_54976de6eedd["solid-component.test.js"]
  af090423_7c56_e0ef_aff3_60e138eda359 -->|defined in| 3ca6ecbf_cbec_c92e_be6f_54976de6eedd
  8d7f131b_07bd_b35f_794a_90796ba30270["createHydrationScriptRegex()"]
  af090423_7c56_e0ef_aff3_60e138eda359 -->|calls| 8d7f131b_07bd_b35f_794a_90796ba30270
  style af090423_7c56_e0ef_aff3_60e138eda359 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/test/solid-component.test.js lines 185–188

function countHydrationScripts(/** @type {string} */ html) {
	// eslint-disable-next-line regexp/prefer-regexp-exec
	return html.match(createHydrationScriptRegex('g'))?.length ?? 0;
}

Subdomains

Frequently Asked Questions

What does countHydrationScripts() do?
countHydrationScripts() is a function in the astro codebase, defined in packages/astro/test/solid-component.test.js.
Where is countHydrationScripts() defined?
countHydrationScripts() is defined in packages/astro/test/solid-component.test.js at line 185.
What does countHydrationScripts() call?
countHydrationScripts() calls 1 function(s): createHydrationScriptRegex.

Analyze Your Own Codebase

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

Try Supermodel Free