MCPcopy Create free account
hub / github.com/BuilderIO/agent-native / normalizeBasePath

Function normalizeBasePath

packages/core/src/client/api-path.ts:3–8  ·  view source on GitHub ↗
(value: string | undefined)

Source from the content-addressed store, hash-verified

1const FRAMEWORK_ROUTE_PREFIX = "/_agent-native";
2
3function normalizeBasePath(value: string | undefined): string {
4 if (!value || value === "/") return "";
5 const trimmed = value.trim();
6 if (!trimmed || trimmed === "/") return "";
7 return `/${trimmed.replace(/^\/+/, "").replace(/\/+$/, "")}`;
8}
9
10function configuredBasePath(): string {
11 const env = (

Callers 2

configuredBasePathFunction · 0.70
pathDerivedBasePathFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…