formatList() — astro Function Reference
Architecture documentation for the formatList() function in util.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 4d4ca247_af9c_4971_0876_548b1a85c288["formatList()"] 05241a8b_1820_8286_5770_4da18477ecde["util.ts"] 4d4ca247_af9c_4971_0876_548b1a85c288 -->|defined in| 05241a8b_1820_8286_5770_4da18477ecde style 4d4ca247_af9c_4971_0876_548b1a85c288 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/runtime/server/render/util.ts lines 55–60
export function formatList(values: string[]): string {
if (values.length === 1) {
return values[0];
}
return `${values.slice(0, -1).join(', ')} or ${values[values.length - 1]}`;
}
Domain
Subdomains
Source
Frequently Asked Questions
What does formatList() do?
formatList() is a function in the astro codebase, defined in packages/astro/src/runtime/server/render/util.ts.
Where is formatList() defined?
formatList() is defined in packages/astro/src/runtime/server/render/util.ts at line 55.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free