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/$2?q=fetch&page=1097&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 12867 results for "fetch"(5880ms)

compileAndUploadTinygoWasmREADME.md1 match

@maxm•Updated 1 year ago
34
35import { wasmHandler } from "https://esm.town/v/maxm/tinygoHttp";
36const resp = await fetch("https://maxm-wasmBlobHost.web.val.run/jpxqvyy5tphiwehzklmioklpkpz4gpzs.wasm");
37const handler = await wasmHandler(new Uint8Array(await resp.arrayBuffer()));
38export default async function(req: Request): Promise<Response> {

QuillEditormain.tsx1 match

@stevekrouse•Updated 1 year ago
64
65 function save() {
66 return fetch('${thisWebURL()}/${name}', {
67 method: 'POST',
68 headers: {

tinybase_example_servermain.tsx1 match

@pomdtr•Updated 1 year ago
34});
35
36export default app.fetch;

mediumToMarkdownmain.tsx6 matches

@fossforlife•Updated 1 year ago
1// Altered from https://github.com/ericclemmons/medium-to-markdown
2
3const fetchJSON = async (url, startAt = 0) => {
4 const response = await fetch(url);
5 const text = await response.text();
6 const json = JSON.parse(text.slice(startAt));
10
11export const mediumToMarkdown = async (mediumLink) => {
12 const raw = await fetchJSON(mediumLink + "?format=json", 16);
13
14 if (raw.error) {
138 case 11:
139 var resource = (
140 await fetchJSON(
141 `https://medium.com/media/${iframe.mediaResourceId}?format=json`,
142 16,
150
151 case "MediaResourceTweet":
152 const tweet = await fetchJSON(
153 `https://publish.twitter.com/oembed?url=${resource.href}`,
154 );
165 case 14:
166 var resource = (
167 await fetchJSON(
168 `https://medium.com/media/${mixtapeMetadata.mediaResourceId}?format=json`,
169 16,

valwritermain.tsx6 matches

@stevekrouse•Updated 1 year ago
2import { updateValByName } from "https://esm.town/v/nbbaier/updateValByName?v=14";
3import { basicAuth } from "https://esm.town/v/pomdtr/basicAuth?v=62";
4import { fetchText } from "https://esm.town/v/stevekrouse/fetchText";
5import { chat } from "https://esm.town/v/stevekrouse/openai";
6import cronstrue from "npm:cronstrue";
19It stores each line of the poem in sqlite.
20It has a textbox that lets anyone input a new line to the poem.`,
21 content: await fetchText("https://esm.town/v/stevekrouse/poembuilder3?v=4"),
22 },
23 {
24 user: "an app that uses chatgpt to convert natural language to cron syntax",
25 content: await fetchText("https://esm.town/v/stevekrouse/cron2"),
26 },
27];
29const app = new Hono();
30
31export default basicAuth(app.fetch);
32app.get("/", async (c) => {
33 const example = examples[Math.floor(Math.random() * examples.length)];
98 Write ONLY Deno TypeScript.
99
100 If you use Hono, use \`export default app.fetch;\` to start the server.
101
102 Only use web standard fetch.
103 // Our library for SQLite
104 import { sqlite } from "https://esm.town/v/std/sqlite";

imgGenUrlmain.tsx1 match

@maxm•Updated 1 year ago
14 await blob.setJSON(genKey(key), url);
15 }
16 return new Response((await fetch(url)).body, { headers: { "content-type": "image/jpg" } });
17}

falImageGenmain.tsx1 match

@isidentical•Updated 1 year ago
8 input: string,
9): Promise<{ url: string }> {
10 let resp = await fetch("https://isidentical-falimagehandler.web.val.run/", {
11 method: "POST",
12 body: JSON.stringify({ prompt: input }),

Queriesmain.tsx1 match

@iamseeley•Updated 1 year ago
2import { blob } from "https://esm.town/v/std/blob";
3
4// Fetch user by username
5export async function getUserByUsername(username: string) {
6 const userResult = await sqlite.execute({

profileHandlersmain.tsx1 match

@iamseeley•Updated 1 year ago
20 return c.html(<EditProfilePage user={user} />);
21 } catch (error) {
22 console.error("Error fetching user:", error);
23 return c.html(
24 <RootLayout>

blob_adminmain.tsx2 matches

@iamseeley•Updated 1 year 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));

fetch-socials4 file matches

@welson•Updated 2 days ago
fetch and archive my social posts

fetchRssForSubcurrent2 file matches

@ashryanio•Updated 2 days ago