Home / Function/ removeLeadingForwardSlash() — astro Function Reference

removeLeadingForwardSlash() — astro Function Reference

Architecture documentation for the removeLeadingForwardSlash() function in path.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  2432efff_5e8d_27fe_9835_6354f118a0ce["removeLeadingForwardSlash()"]
  f5377c99_3ce3_1abd_148f_93394ff5efe2["path.ts"]
  2432efff_5e8d_27fe_9835_6354f118a0ce -->|defined in| f5377c99_3ce3_1abd_148f_93394ff5efe2
  b2287e86_0107_ea7f_780b_5f92d155cf1a["joinPaths()"]
  b2287e86_0107_ea7f_780b_5f92d155cf1a -->|calls| 2432efff_5e8d_27fe_9835_6354f118a0ce
  style 2432efff_5e8d_27fe_9835_6354f118a0ce fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/internal-helpers/src/path.ts lines 31–33

export function removeLeadingForwardSlash(path: string) {
	return path.startsWith('/') ? path.substring(1) : path;
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does removeLeadingForwardSlash() do?
removeLeadingForwardSlash() is a function in the astro codebase, defined in packages/internal-helpers/src/path.ts.
Where is removeLeadingForwardSlash() defined?
removeLeadingForwardSlash() is defined in packages/internal-helpers/src/path.ts at line 31.
What calls removeLeadingForwardSlash()?
removeLeadingForwardSlash() 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