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=1149&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 13268 results for "fetch"(4799ms)

passkeys_demomain.tsx1 match

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

umbrellaRemindermain.tsx2 matches

@astrat1•Updated 1 year ago
1import { email } from "https://esm.town/v/std/email?v=9";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3import { nominatimSearch } from "https://esm.town/v/stevekrouse/nominatimSearch";
4import { weatherGovGrid } from "https://esm.town/v/stevekrouse/weatherGovGrid";
14 lon,
15 });
16 let { properties: { periods } } = await fetchJSON(
17 grid.forecastHourly,
18 );

gameplay_agentmain.tsx5 matches

@saolsen•Updated 1 year ago
7 * If you define your agent with {@link Connect4Agent} or {@link PokerAgent},
8 * then you can use {@link agentHandler} to create an http service that
9 * serves it. The service it creates is a standard fetch handler that can be
10 * used with a variety of different http server libraries.
11 *
48 * ]});
49 *
50 * Bun.serve({fetch: handler});
51 * ```
52 *
114
115/**
116 * Create standard fetch handler for an agent.
117 *
118 * Takes a list of agents and returns a handler that can be used to create an
119 * agent http endpoint.
120 * The handler implements the standard fetch interface and can be used with
121 * a variety of different http server libraries.
122 *
132 *
133 * @returns {(req: Request) => Promise<Response>} An async handler that can be
134 * used with an http server that supports the fetch interface.
135 */
136export function agentHandler<

bookmarkmain.tsx1 match

@hlobil•Updated 1 year ago
78});
79
80export default app.fetch;

myspacemain.tsx2 matches

@jdan•Updated 1 year ago
2import { Hono } from "npm:hono@3";
3
4// TODO: Fetch from key-value
5const profile = {
6 displayName: "Jordan",
169app.get("/", (c) => c.html(myspaceHtml(profile)));
170
171export default app.fetch;

myspacemain.tsx2 matches

@stevekrouse•Updated 1 year ago
2import { Hono } from "npm:hono@3";
3
4// TODO: Fetch from key-value
5const profile = {
6 displayName: "Jordan",
169app.get("/", (c) => c.html(myspaceHtml(profile)));
170
171export default app.fetch;

myspacemain.tsx2 matches

@alana•Updated 1 year ago
2import { Hono } from "npm:hono@3";
3
4// TODO: Fetch from key-value
5const profile = {
6 displayName: "Jordan",
159app.get("/", (c) => c.html(myspaceHtml(profile)));
160
161export default app.fetch;

serve_routermain.tsx1 match

@yieldray•Updated 1 year ago
24 .get("/two", () => new Response("two"));
25
26export const serve_router = app.fetch

redSpoonbillmain.tsx2 matches

@Joelsrubin•Updated 1 year ago
1export async function getTopTenBattingAverage() {
2 const data = await fetch(
3 "http://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/seasons/2024/types/2/leaders?lang=en&region=us",
4 );
7 .map((
8 l,
9 ) => fetch(l).then(response => response.json()));
10
11 const finalList = await Promise.all(promises);

ctanPackageNamesmain.tsx1 match

@aleaf•Updated 1 year ago
1export default async function(req: Request): Promise<Response> {
2 const response = await fetch("https://ctan.org/json/2.0/packages");
3 const packages = await response.json();
4 const output = packages.map(item => item.name).join("\n");

GithubPRFetcher

@andybak•Updated 12 hours ago

proxiedfetch1 file match

@jayden•Updated 1 day ago