Home / Function/ stringifyParams() — astro Function Reference

stringifyParams() — astro Function Reference

Architecture documentation for the stringifyParams() function in params.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  e87dd737_8937_2d4a_1488_f6971a745ad2["stringifyParams()"]
  00c121f1_0bde_b84d_5b28_5500b9c5b967["params.ts"]
  e87dd737_8937_2d4a_1488_f6971a745ad2 -->|defined in| 00c121f1_0bde_b84d_5b28_5500b9c5b967
  style e87dd737_8937_2d4a_1488_f6971a745ad2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/core/routing/params.ts lines 13–28

export function stringifyParams(
	params: GetStaticPathsItem['params'],
	route: RouteData,
	trailingSlash: AstroConfig['trailingSlash'],
) {
	// validate parameter values then stringify each value
	const validatedParams: Record<string, string> = {};
	for (const [key, value] of Object.entries(params)) {
		validateGetStaticPathsParameter([key, value], route.component);
		if (value !== undefined) {
			validatedParams[key] = trimSlashes(value);
		}
	}

	return getRouteGenerator(route.segments, trailingSlash)(validatedParams);
}

Domain

Subdomains

Frequently Asked Questions

What does stringifyParams() do?
stringifyParams() is a function in the astro codebase, defined in packages/astro/src/core/routing/params.ts.
Where is stringifyParams() defined?
stringifyParams() is defined in packages/astro/src/core/routing/params.ts at line 13.

Analyze Your Own Codebase

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

Try Supermodel Free