MCPcopy Create free account
hub / github.com/triggerdotdev/jsonhero-web / getPathFromRequest

Function getPathFromRequest

app/routes/j/$id.tsx:125–139  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

123};
124
125function getPathFromRequest(request: Request): string | null {
126 const url = new URL(request.url);
127
128 const path = url.searchParams.get("path");
129
130 if (!path) {
131 return null;
132 }
133
134 if (path.startsWith("$.")) {
135 return path;
136 }
137
138 return `$.${path}`;
139}
140
141function getMinimalFromRequest(request: Request): boolean | undefined {
142 const url = new URL(request.url);

Callers 1

loaderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected