addLeadingSlash() — astro Function Reference
Architecture documentation for the addLeadingSlash() function in static-build.test.js from the astro codebase.
Entity Profile
Dependency Diagram
graph TD b8bd1dbb_0fa9_f143_3fc9_b7941e7acbdc["addLeadingSlash()"] 8471ccab_7433_7e69_af6a_2a12f4246c8b["static-build.test.js"] b8bd1dbb_0fa9_f143_3fc9_b7941e7acbdc -->|defined in| 8471ccab_7433_7e69_af6a_2a12f4246c8b style b8bd1dbb_0fa9_f143_3fc9_b7941e7acbdc fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/test/static-build.test.js lines 7–9
function addLeadingSlash(path) {
return path.startsWith('/') ? path : '/' + path;
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does addLeadingSlash() do?
addLeadingSlash() is a function in the astro codebase, defined in packages/astro/test/static-build.test.js.
Where is addLeadingSlash() defined?
addLeadingSlash() is defined in packages/astro/test/static-build.test.js at line 7.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free