Home / Function/ removeBase() — astro Function Reference

removeBase() — astro Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

packages/internal-helpers/src/path.ts lines 234–239

export function removeBase(path: string, base: string) {
	if (path.startsWith(base)) {
		return path.slice(removeTrailingForwardSlash(base).length);
	}
	return path;
}

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free