Home / Function/ removeTrailingForwardSlash() — astro Function Reference

removeTrailingForwardSlash() — astro Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  f26aab43_54ca_4fc2_d0a7_84567625122d["removeTrailingForwardSlash()"]
  f5377c99_3ce3_1abd_148f_93394ff5efe2["path.ts"]
  f26aab43_54ca_4fc2_d0a7_84567625122d -->|defined in| f5377c99_3ce3_1abd_148f_93394ff5efe2
  b2287e86_0107_ea7f_780b_5f92d155cf1a["joinPaths()"]
  b2287e86_0107_ea7f_780b_5f92d155cf1a -->|calls| f26aab43_54ca_4fc2_d0a7_84567625122d
  18f7cb36_c58f_0cd8_c7f6_3901294ffbc6["removeBase()"]
  18f7cb36_c58f_0cd8_c7f6_3901294ffbc6 -->|calls| f26aab43_54ca_4fc2_d0a7_84567625122d
  style f26aab43_54ca_4fc2_d0a7_84567625122d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/internal-helpers/src/path.ts lines 27–29

export function removeTrailingForwardSlash(path: string) {
	return path.endsWith('/') ? path.slice(0, path.length - 1) : path;
}

Domain

Subdomains

Frequently Asked Questions

What does removeTrailingForwardSlash() do?
removeTrailingForwardSlash() is a function in the astro codebase, defined in packages/internal-helpers/src/path.ts.
Where is removeTrailingForwardSlash() defined?
removeTrailingForwardSlash() is defined in packages/internal-helpers/src/path.ts at line 27.
What calls removeTrailingForwardSlash()?
removeTrailingForwardSlash() is called by 2 function(s): joinPaths, removeBase.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free