trimSlashes() — astro Function Reference
Architecture documentation for the trimSlashes() function in path.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 76420228_a888_d0b8_b938_a3fdb41e774c["trimSlashes()"] f5377c99_3ce3_1abd_148f_93394ff5efe2["path.ts"] 76420228_a888_d0b8_b938_a3fdb41e774c -->|defined in| f5377c99_3ce3_1abd_148f_93394ff5efe2 b2287e86_0107_ea7f_780b_5f92d155cf1a["joinPaths()"] b2287e86_0107_ea7f_780b_5f92d155cf1a -->|calls| 76420228_a888_d0b8_b938_a3fdb41e774c style 76420228_a888_d0b8_b938_a3fdb41e774c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/internal-helpers/src/path.ts lines 39–41
export function trimSlashes(path: string) {
return path.replace(/^\/|\/$/g, '');
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does trimSlashes() do?
trimSlashes() is a function in the astro codebase, defined in packages/internal-helpers/src/path.ts.
Where is trimSlashes() defined?
trimSlashes() is defined in packages/internal-helpers/src/path.ts at line 39.
What calls trimSlashes()?
trimSlashes() is called by 1 function(s): joinPaths.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free