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/?q=fetch&page=222&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 2440 results for "fetch"(565ms)

fiberplaneHonoZodStarterindex.ts1 match

@fiberplane•Updated 1 month ago
105});
106
107export default app.fetch;

Prompt_Improverservice-worker.js2 matches

@toowired•Updated 1 month ago
18});
19
20self.addEventListener('fetch', event => {
21 event.respondWith(
22 caches.match(event.request)
23 .then(response => {
24 return response || fetch(event.request);
25 })
26 );

HONCindex.ts2 matches

@fiberplane•Updated 1 month ago
63/**
64 * Wrap the incoming request, inject the Deno env vars into the Hono app,
65 * and then call the Hono api entrypoint (`app.fetch`)
66 */
67export default async function(req: Request): Promise<Response> {
74 //
75 // If you don't want those values, remove them from the env object
76 return app.fetch(req, env);
77}

cerebras_coderindex1 match

@brevmana•Updated 1 month ago
5async function servePublicFile(path: string): Promise<Response> {
6 const url = new URL("./public/" + path, import.meta.url);
7 const text = await (await fetch(url, {
8 headers: {
9 "User-Agent": "", // to transpile TS to JS

cerebras_coderindex1 match

@brevmana•Updated 1 month ago
181
182 try {
183 const response = await fetch("/", {
184 method: "POST",
185 body: JSON.stringify({

hardballcityfront1 match

@flymaster•Updated 1 month ago
9 const app = await getApp();
10
11 return app.fetch(req);
12}
13

valflowsketch.ts2 matches

@maxm•Updated 1 month ago
41 return { success: true, functions: rows.rows };
42 } catch (error) {
43 return { success: false, message: `Error fetching functions: ${Deno.inspect(error)}` };
44 }
45}
86 }
87 else if (req.method === "GET") {
88 // Check if we're fetching all functions or a specific path
89 if (url.pathname === "/functions") {
90 const functions = await getAllFunctions();

hardballcitypostComment1 match

@flymaster•Updated 1 month ago
12 const app = await getApp();
13
14 return app.fetch(req);
15}
16

coffeeindex1 match

@ts2004•Updated 1 month ago
5async function servePublicFile(path: string): Promise<Response> {
6 const url = new URL("./public/" + path, import.meta.url);
7 const text = await (await fetch(url, {
8 headers: {
9 "User-Agent": "", // to transpile TS to JS

coffeeindex1 match

@ts2004•Updated 1 month ago
181
182 try {
183 const response = await fetch("/", {
184 method: "POST",
185 body: JSON.stringify({

fetchPaginatedData2 file matches

@nbbaier•Updated 5 days ago

tweetFetcher2 file matches

@nbbaier•Updated 1 week ago