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/$%7Burl%7D?q=fetch&page=718&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 8686 results for "fetch"(1993ms)

aliasExamplemain.tsx2 matches

@pomdtr•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=43";
2
3console.log(await fetchJSON("https://api.val.town/v1/alias/stevekrouse"));

getValVersionsmain.tsx2 matches

@pomdtr•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=43";
2
3console.log(await fetchJSON("https://api.val.town/v1/vals/7f9019e4-dbf8-4ebe-b8cd-67730697624e/versions"));

getValmain.tsx2 matches

@pomdtr•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=43";
2
3console.log(await fetchJSON("https://api.val.town/v1/vals/7f9019e4-dbf8-4ebe-b8cd-67730697624e"));

userValsExamplemain.tsx2 matches

@pomdtr•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=43";
2
3console.log(await fetchJSON("https://api.val.town/v1/users/a0bf3b31-15a5-4d5c-880e-4b1e22c9bc18/vals"));

evalPost2main.tsx2 matches

@pomdtr•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3console.log(
4 await fetchJSON(
5 "https://api.val.town/v1/eval",
6 {

hnFollowAppmain.tsx2 matches

@bentossell•Updated 1 year ago
9 search_by_date: true,
10 });
11 // for each post get the number of upvotes from the hackernews api using fetch
12 for (let post of posts) {
13 let res = await fetch(`https://hacker-news.firebaseio.com/v0/item/${post.objectID}.json`);
14 post.upvotes = await res.json();
15 }

evalPost1main.tsx2 matches

@pomdtr•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3console.log(
4 await fetchJSON(
5 "https://api.val.town/v1/eval",
6 {

ntfyReqmain.tsx1 match

@arrudaricardo•Updated 1 year ago
152
153export async function sendNotification(baseURL: string, body: NtfyJSONBody): Promise<Response> {
154 return await fetch(baseURL, {
155 method: "POST",
156 body: JSON.stringify(body),

vtTypesmain.tsx1 match

@easrng•Updated 1 year ago
82 return new Response(
83 `/// <reference no-default-lib="true"/>\n`
84 + ((await Promise.all(urls.map(url => fetch(url).then(res => res.text())))).join("\n\n").replace(
85 /^\/\/\/.+/gm,
86 "",

gltf_torusmain.tsx1 match

@vladimyr•Updated 1 year ago
228});
229
230export default app.fetch;

fetchPaginatedData2 file matches

@nbbaier•Updated 3 weeks ago

FetchBasic1 file match

@fredmoon•Updated 3 weeks ago