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=593&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 8238 results for "fetch"(1554ms)

sqliteExplorerAppmain.tsx4 matches

@samwho•Updated 9 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(
179 modifyFetchHandler(passwordAuth(handler, { verifyPassword: (p) => p === Deno.env.get("sqlitePassword") })),
180);

cuetipmain.tsx2 matches

@pinjasaur•Updated 9 months ago
8};
9
10const getJSON = async url => (await fetch(url)).json();
11const getText = async url => (await fetch(url)).text();
12
13function generateSCSS(vars) {

blob_adminmain.tsx2 matches

@cufaoil•Updated 9 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";
133});
134
135export default modifyFetchHandler(passwordAuth(app.fetch));

gardlandmain.tsx2 matches

@zarutian•Updated 9 months ago
1// @ts-check js
2import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
3// til minnis: þarf að uppfæra þetta til að nota Hano
4/*
8export const gardland = async (req, res) => {
9 const page = {};
10 page["heroimg"] = await fetchText(
11 "https://gist.githubusercontent.com/zarutian/f48745853a6ebf4819038a88e180efb0/raw/9de6ffc5b2e5814f9ed1ce46ac15de9919ce5286/gardland_data.txt",
12 );

sqliteExplorerAppmain.tsx4 matches

@yawnxyz•Updated 9 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 })));

sqliteExplorerAppmain.tsx4 matches

@pom421•Updated 9 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 })));

randomFavmain.tsx1 match

@karkowg•Updated 9 months ago
4 const emoji = randomEmoji();
5
6 return fetch(`https://karkowg-fav.web.val.run?emoji=${emoji}`);
7}

changesmain.tsx3 matches

@willthereader•Updated 9 months ago
6import {
7 init,
8 traced_fetch,
9 traced_handler,
10} from "https://esm.town/v/saolsen/tracing";
39 val_req_url = `${val_req_url}?v=${version}`;
40 }
41 const val_resp: Response = await traced_fetch(val_req_url);
42 const val_version = Number(val_resp.url.split("?v=")[1]);
43 const val_body: string = await val_resp.text();
166async function handler(req: Request): Promise<Response> {
167 await track("saolsen.changes", req);
168 return await app.fetch(req);
169}
170
10});
11
12export default app.fetch;
13

livestatusmain.tsx2 matches

@triozer•Updated 9 months ago
10 getChannelLink: (username: string) => `https://twitch.tv/${username}`,
11 isLive: async (username: string) => {
12 const response = await fetch(`https://twitch.tv/${username}`);
13 const sourceCode = await response.text();
14
20 getChannelLink: (username: string) => `https://youtube.com/c/${username}/live`,
21 isLive: async (username: string) => {
22 const livePageResponse = await fetch(
23 `https://www.youtube.com/c/${username}/live`,
24 );

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago