MCPcopy Create free account
hub / github.com/fontsource/fontsource / loader

Function loader

website/app/routes/docs.search.tsx:9–17  ·  view source on GitHub ↗
({ request }: LoaderFunctionArgs)

Source from the content-addressed store, hash-verified

7};
8
9export const loader = async ({ request }: LoaderFunctionArgs) => {
10 const { searchParams } = new URL(request.url);
11 const query = searchParams.get('query')?.trim() ?? '';
12 if (query.length < 2) return Response.json([], { headers });
13
14 const results = await searchDocs(query, 8);
15
16 return Response.json(results, { headers });
17};

Callers

nothing calls this directly

Calls 3

searchDocsFunction · 0.90
jsonMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected