MCPcopy Index your code
hub / github.com/BuilderIO/agent-native / pathDerivedBasePath

Function pathDerivedBasePath

packages/core/src/client/api-path.ts:20–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18}
19
20function pathDerivedBasePath(): string {
21 if (typeof window === "undefined") return "";
22 const pathname = window.location.pathname;
23 const markerIndex = pathname.indexOf(FRAMEWORK_ROUTE_PREFIX);
24 if (markerIndex <= 0) return "";
25 return normalizeBasePath(pathname.slice(0, markerIndex));
26}
27
28export function appBasePath(): string {
29 return configuredBasePath() || pathDerivedBasePath();

Callers 1

appBasePathFunction · 0.85

Calls 1

normalizeBasePathFunction · 0.70

Tested by

no test coverage detected