getTrailingSlashPattern() — astro Function Reference
Architecture documentation for the getTrailingSlashPattern() function in pattern.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD b305ae39_dc2b_c368_dc79_efce7e04dcd4["getTrailingSlashPattern()"] 341b1026_6b09_5d29_5fc3_f56443492092["pattern.ts"] b305ae39_dc2b_c368_dc79_efce7e04dcd4 -->|defined in| 341b1026_6b09_5d29_5fc3_f56443492092 f354bedf_10d5_4cb7_90f2_ccd0810481ae["getPattern()"] f354bedf_10d5_4cb7_90f2_ccd0810481ae -->|calls| b305ae39_dc2b_c368_dc79_efce7e04dcd4 style b305ae39_dc2b_c368_dc79_efce7e04dcd4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/core/routing/manifest/pattern.ts lines 47–55
function getTrailingSlashPattern(addTrailingSlash: AstroConfig['trailingSlash']): string {
if (addTrailingSlash === 'always') {
return '\\/$';
}
if (addTrailingSlash === 'never') {
return '$';
}
return '\\/?$';
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does getTrailingSlashPattern() do?
getTrailingSlashPattern() is a function in the astro codebase, defined in packages/astro/src/core/routing/manifest/pattern.ts.
Where is getTrailingSlashPattern() defined?
getTrailingSlashPattern() is defined in packages/astro/src/core/routing/manifest/pattern.ts at line 47.
What calls getTrailingSlashPattern()?
getTrailingSlashPattern() is called by 1 function(s): getPattern.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free