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=616&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 8457 results for "fetch"(1183ms)

violetFerretmain.tsx1 match

@tempguy•Updated 9 months ago
1import { blob } from "https://esm.town/v/std/blob?v=12";
2export default async function(interval: Interval) {
3 await fetch("https://tempguy-scarletsole.web.val.run/refresh");
4 const date = new Date();
5 await blob.setJSON("turnstileCron", { ptime: date.getTime(), ntime: interval.delay + interval.lastRunAt.getTime() });

beigeMandrillmain.tsx2 matches

@iamseeley•Updated 9 months ago
33
34 try {
35 const response = await fetch(apiUrl, {
36 method: 'POST',
37 headers: {
52 const pngUrl = jsonResponse.url;
53
54 const pngResponse = await fetch(pngUrl);
55 const pngBuffer = await pngResponse.arrayBuffer();
56

sqliteExplorerAppmain.tsx4 matches

@alongwill•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 })));

stitchValmain.tsx1 match

@smca•Updated 9 months ago
229 `);
230});
231export default app.fetch;

SagaImmoScrapermain.tsx2 matches

@matthiasraimann•Updated 9 months ago
8 maxQM: number,
9): Promise<Immo[]> {
10 const html = await fetch("https://www.saga.hamburg/immobiliensuche?Kategorie=APARTMENT").then(res => res.text());
11 const exploredBefore = (await blob.getJSON("immos") || []) as string[];
12
32 const location = immo.querySelector("p.pb-3")?.textContent ?? "Adresse nicht gefunden";
33
34 const detailsHTML = await fetch("https://www.saga.hamburg" + detailURL).then(res => res.text());
35
36 const details = new JSDOM(detailsHTML).window.document;

stitchValmain.tsx1 match

@yawnxyz•Updated 9 months ago
229 `);
230});
231export default app.fetch;
165 code: newCode,
166 });
167 fetch('/save', { method: "POST", body }).then(() => {
168 document.getElementById('code-input-hidden').value = newCode;
169 document.getElementById('preview-iframe').src += '';
180 code: newCode,
181 });
182 fetch('/save', { method: "POST", body }).then(() => {
183 document.getElementById('code-input-hidden').value = newCode;
184 document.getElementById('preview-iframe').src += '';
190 code: newCode,
191 });
192 fetch('/save', { method: "POST", body }).then(() => {
193 document.getElementById('code-input-hidden').value = newCode;
194 document.getElementById('preview-iframe').src += '';
159 code: newCode,
160 });
161 fetch('/save', { method: "POST", body }).then(() => {
162 document.getElementById('code-input-hidden').value = newCode;
163 document.getElementById('preview-iframe').src += '';

fetchPaginatedData2 file matches

@nbbaier•Updated 2 weeks ago

FetchBasic1 file match

@fredmoon•Updated 2 weeks ago