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=531&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 8481 results for "fetch"(2166ms)

gptmemorymain.tsx1 match

@toowired•Updated 6 months ago
919 });
920
921 return app.fetch(req);
922};

professionalFuchsiaSmeltmain.tsx4 matches

@yuxuan•Updated 6 months ago
1import { email } from "https://esm.town/v/std/email?v=9";
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
9}
10
11const randomJoke = await fetchRandomJoke();
12const setup = randomJoke.setup;
13const punchline = randomJoke.punchline;

fetchXMLmain.tsx3 matches

@g000m•Updated 6 months ago
1import { parseXML } from "https://esm.town/v/g000m/parseXML";
2import { fetchText } from "https://esm.town/v/stevekrouse/fetchText";
3import { normalizeURL } from "https://esm.town/v/stevekrouse/normalizeURL";
4
5export let fetchXML = (url: string) =>
6 fetchText(normalizeURL(url))
7 .then(parseXML);

blob_adminmain.tsx2 matches

@jasonleefrench•Updated 6 months ago
1/** @jsxImportSource https://esm.sh/hono@4.0.8/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import view_route from "https://esm.town/v/pomdtr/blob_admin_blob";
5import create_route from "https://esm.town/v/pomdtr/blob_admin_create";
137});
138
139export default modifyFetchHandler(passwordAuth(app.fetch));

DadJokesmain.tsx4 matches

@ryanchoi100•Updated 6 months ago
1import { email } from "https://esm.town/v/std/email?v=9";
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
9}
10
11const randomJoke = await fetchRandomJoke();
12const setup = randomJoke.setup;
13const punchline = randomJoke.punchline;

show_keyword_cloudmain.tsx1 match

@vip•Updated 6 months ago
7
8 useEffect(() => {
9 fetch("/keywords")
10 .then(response => response.json())
11 .then(data => setKeywords(data));

searchArXiVmain.tsx1 match

@aleaf•Updated 6 months ago
5 url.searchParams.set("start", String(start))
6 url.searchParams.set("max_results", String(max_results))
7 const response = await fetch(url)
8 const text = await response.text()
9 if (!response.ok) {

sqlite_adminmain.tsx1 match

@bons•Updated 6 months ago
10app.get("/", async (c) => c.html(await sqlite_admin_tables()));
11app.get("/:table", async (c) => c.html(await sqlite_admin_table(c.req.param("table"))));
12export default basicAuth(app.fetch, { verifyUser: (_, password) => verifyToken(password) });

StripeCheckoutDemomain.tsx2 matches

@vawogbemi•Updated 6 months ago
250 e.preventDefault();
251 const finalAmount = showCustomAmount ? parseFloat(customAmount) : amount;
252 const response = await fetch("/create-checkout-session", {
253 method: "POST",
254 headers: { "Content-Type": "application/json" },
510 }
511
512 // Fetch all tips for the root endpoint
513 const allTips = await sqlite.execute(
514 `SELECT name, amount, comment, timestamp FROM ${KEY}_payments_${SCHEMA_VERSION} ORDER BY amount DESC`,

sqliteExplorerAppmain.tsx4 matches

@tay•Updated 6 months ago
1/** @jsxImportSource https://esm.sh/hono@latest/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import { iframeHandler } from "https://esm.town/v/nbbaier/iframeHandler";
5import { resetStyle } from "https://esm.town/v/nbbaier/resetStyle";
16import { verifyToken } from "https://esm.town/v/pomdtr/verifyToken";
17import { ResultSet, sqlite } from "https://esm.town/v/std/sqlite";
18import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
19import { Hono } from "npm:hono";
20import type { FC } from "npm:hono/jsx";
175});
176
177export const handler = app.fetch;
178export default iframeHandler(modifyFetchHandler(passwordAuth(handler, { verifyPassword: verifyToken })));

fetchPaginatedData2 file matches

@nbbaier•Updated 2 weeks ago

FetchBasic1 file match

@fredmoon•Updated 2 weeks ago