MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / apiUrl

Function apiUrl

packages/client/src/api/config.ts:21–27  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

19}
20
21export function apiUrl(path: string): string {
22 const root = apiRoot();
23 if (!root) {
24 return path;
25 }
26 return `${root}${path.startsWith("/") ? path : `/${path}`}`;
27}
28
29function normalizeRoot(root: string): string {
30 return root.replace(/\/+$/, "");

Callers 11

webSocketApiUrlFunction · 0.90
postStreamConfigFunction · 0.90
postWebRtcOfferFunction · 0.90
buildClientTelemetryUrlFunction · 0.90
frontendUrlFunction · 0.90
simDeckBaseUrlFunction · 0.90
apiRequestFunction · 0.90
fetchSimulatorBlobFunction · 0.90

Calls 1

apiRootFunction · 0.85

Tested by

no test coverage detected