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=266&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 2746 results for "fetch"(383ms)

imgGenUrlmain.tsx1 match

@maxm•Updated 11 months ago
14 await blob.setJSON(genKey(key), url);
15 }
16 return new Response((await fetch(url)).body, { headers: { "content-type": "image/jpg" } });
17}

reppmain.tsx3 matches

@maxm•Updated 11 months ago
11blob.setJSON;
12
13const fetch = async (req: Request): Promise<Response> => {
14 let repp = new Repp([{
15 code: "",
165}
166
167export default fetch;
168// https://stackoverflow.com/a/67394423/1333724
169// var __EVAL = async (s) => eval(`(async () => (void (__EVAL = ${__EVAL.toString()}); ${s}))()`);
173// // evaluate("ten + cube(3)");
174// evaluate(`
175// let resp = await fetch('https://www.google.com');
176// console.log(resp)
177// let x = 10

honoExamplemain.tsx1 match

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

staticChessV2main.tsx2 matches

@maxm•Updated 11 months ago
10
11 constructor() {}
12 async fetch(req: Request): Promise<Response> {
13 if (new URL(req.url).pathname === "/robots.txt") {
14 return new Response("User-agent: *\nDisallow: /");
224const sc = new StaticChess();
225
226export default sc.fetch.bind(sc);

tinygoHttpExampleREADME.md1 match

@maxm•Updated 11 months ago
16
17import { wasmHandler } from "https://esm.town/v/maxm/tinygoHttp";
18const resp = await fetch("https://maxm-wasmblobhost.web.val.run/jpxqvyy5tphiwehzklmioklpkpz4gpzs.wasm");
19const handler = await wasmHandler(new Uint8Array(await resp.arrayBuffer()));
20export default async function(req: Request): Promise<Response> {

passkeys_demomain.tsx1 match

@stevekrouse•Updated 1 year ago
298 return c.json("success");
299});
300export default app.fetch;

frequencyDotPlotmain.tsx1 match

@stevekrouse•Updated 1 year ago
23});
24
25export default app.fetch;

jadeOpossummain.tsx2 matches

@tmcw•Updated 1 year ago
1import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
2import { form } from "https://esm.town/v/stevekrouse/date_me_form";
3import browse from "https://esm.town/v/stevekrouse/dateme_browse";
13app.get("/faq", faq);
14app.get("/rss.xml", c => dateMeRSS(c.req as unknown as Request));
15export default modifyFetchHandler(app.fetch, {
16 style: `@media (max-width: 500px) {
17 .github-fork-ribbon {

datememain.tsx2 matches

@tmcw•Updated 1 year ago
1import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
2import { form } from "https://esm.town/v/stevekrouse/date_me_form";
3import browse from "https://esm.town/v/stevekrouse/dateme_browse";
13app.get("/faq", faq);
14app.get("/rss.xml", c => dateMeRSS(c.req as unknown as Request));
15export default modifyFetchHandler(app.fetch, {
16 style: `@media (max-width: 500px) {
17 .github-fork-ribbon {

calorieappmain.tsx1 match

@stevekrouse•Updated 1 year ago
83});
84
85export default app.fetch;

fetchPaginatedData2 file matches

@nbbaier•Updated 6 days ago

tweetFetcher2 file matches

@nbbaier•Updated 1 week ago