Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/$1?q=fetch&page=48&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=fetch

Returns an array of strings in format "username" or "username/projectName"

Found 13573 results for "fetch"(3500ms)

Glancerindex.ts1 match

@lightweight•Updated 3 days ago
44});
45
46export default app.fetch;
47

TownieChatRouteSingleColumn.tsx6 matches

@valdottown•Updated 3 days ago
49 files={project.data?.files}
50 branchId={branchId}
51 refetch={project.refetch}
52 />
53 </ProjectContext>
59 files,
60 branchId,
61 refetch,
62}: {
63 project: any;
64 files: any[];
65 branchId: string;
66 refetch: () => void;
67}) {
68 const [images, setImages] = useState<(string|null)[]>([]);
94 if (!messages?.length) return;
95 let last = messages.at(-1);
96 if (shouldRefetch(last)) {
97 refetch();
98 }
99 }, [messages]);
194}
195
196function shouldRefetch (message) {
197 for (let i = 0; i < message?.parts?.length; i++) {
198 let part = message.parts[i];

hono-utilsexample.http.ts1 match

@matt_hallway•Updated 3 days ago
14);
15
16export default app.fetch;

hono-utilsREADME.md1 match

@matt_hallway•Updated 3 days ago
14}))
15
16export default app.fetch
17```

hono-utilsmod.ts1 match

@matt_hallway•Updated 3 days ago
9 const getContent = async (url: string) => {
10 try {
11 const resp = await fetch(url)
12 if (!resp.ok) {
13 return null

paperang_printerindex.ts1 match

@dcm31•Updated 3 days ago
353});
354
355export default app.fetch;

paperang_printerutils.js2 matches

@dcm31•Updated 3 days ago
20 paperangProtocol.log(`Saving MAC address: ${macAddress}`, 'info');
21
22 const response = await fetch('/api/save-mac', {
23 method: 'POST',
24 headers: { 'Content-Type': 'application/json' },
45 paperangProtocol.log('Loading saved MAC address...', 'debug');
46
47 const response = await fetch('/api/get-mac');
48 const result = await response.json();
49

ctan-mirrormain.ts1 match

@aeaton•Updated 3 days ago
7 }
8
9 const result = await fetch(`https://mirrors.ctan.org/${path}`);
10 if (!result.ok) {
11 return new Response(result.statusText, { status: result.status });

bluetoothscannerindex.ts1 match

@dcm31•Updated 3 days ago
20});
21
22export default app.fetch;

HTTP_exampleshonoExample1 match

@eddloschi•Updated 3 days ago
4app.get("/", (c) => c.text("Hello from Hono!"));
5app.get("/yeah", (c) => c.text("Routing!"));
6export default app.fetch;

FetchBasic2 file matches

@ther•Updated 5 hours ago

GithubPRFetcher

@andybak•Updated 3 days ago