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=65&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 12027 results for "fetch"(970ms)

Robbiepredictions.ts2 matches

@Robbie•Updated 6 hours ago
11 return c.json(allPredictions);
12 } catch (error) {
13 console.error("Error fetching predictions:", error);
14 return c.json({ error: "Failed to fetch predictions" }, 500);
15 }
16});

Robbiecrypto.ts3 matches

@Robbie•Updated 6 hours ago
7crypto.get("/", async (c) => {
8 try {
9 const response = await fetch(
10 "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&order=market_cap_desc&per_page=20&page=1&sparkline=false"
11 );
29 return c.json(cryptos);
30 } catch (error) {
31 console.error("Error fetching crypto data:", error);
32 return c.json({ error: "Failed to fetch cryptocurrency data" }, 500);
33 }
34});

sqliteExplorerAppmain.tsx4 matches

@tobeofuse•Updated 6 hours ago
1/** @jsxImportSource npm:hono/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 })));

Artreonindex.ts1 match

@UnzipMe•Updated 6 hours ago
38
39// This is the entry point for HTTP vals
40export default app.fetch;

ArtreonCreateArtistForm.tsx1 match

@UnzipMe•Updated 6 hours ago
30
31 try {
32 const response = await fetch('/api/artists', {
33 method: 'POST',
34 headers: {

ArtreonContactForm.tsx1 match

@UnzipMe•Updated 6 hours ago
31 };
32
33 const response = await fetch('/api/contact', {
34 method: 'POST',
35 headers: {

ArtreonPortfolio.tsx1 match

@UnzipMe•Updated 6 hours ago
20 const loadPortfolio = async () => {
21 try {
22 const response = await fetch(`/api/portfolio/artist/${artist.id}`);
23 const data = await response.json();
24 setPortfolio(data);

ArtreonApp.tsx2 matches

@UnzipMe•Updated 6 hours ago
33 try {
34 const [artistsRes, portfolioRes] = await Promise.all([
35 fetch('/api/artists'),
36 fetch('/api/portfolio/featured')
37 ]);
38

Artreoncontact.ts2 matches

@UnzipMe•Updated 6 hours ago
41 return c.json(messages);
42 } catch (error) {
43 console.error("Error fetching contact messages:", error);
44 return c.json({ error: "Failed to fetch messages" }, 500);
45 }
46});

Artreonportfolio.ts4 matches

@UnzipMe•Updated 6 hours ago
17 return c.json(items);
18 } catch (error) {
19 console.error("Error fetching featured portfolio:", error);
20 return c.json({ error: "Failed to fetch featured portfolio" }, 500);
21 }
22});
34 return c.json(portfolio);
35 } catch (error) {
36 console.error("Error fetching portfolio:", error);
37 return c.json({ error: "Failed to fetch portfolio" }, 500);
38 }
39});

fetch-socials4 file matches

@welson•Updated 1 day ago
fetch and archive my social posts

fetchRssForSubcurrent2 file matches

@ashryanio•Updated 1 day ago