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/$%7Bsuccess?q=fetch&page=747&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 8410 results for "fetch"(1652ms)

testDoeMenuLinesmain.tsx2 matches

@tal•Updated 1 year ago
1import { parseMenuLine } from "https://esm.town/v/tal/parseMenuLine";
2import { fetchDOEMenu } from "https://esm.town/v/tal/fetchDOEMenu";
3
4export const testDoeMenuLines = (async () => {
5 const menuText = await fetchDOEMenu({
6 schoolYear: "2023-2024",
7 month: "september",

emailRandomJokemain.tsx4 matches

@jay•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function emailRandomJoke() {
4 async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();
9 }
10 const randomJoke = await fetchRandomJoke();
11 const setup = randomJoke.setup;
12 const punchline = randomJoke.punchline;

nasaAPODmain.tsx2 matches

@valstu•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Returns NASA's Astronomy Picture of the Day (APOD)
4export const nasaAPOD = fetchJSON("cutt.ly/T7ksirK");
5// Forked from @iBrokeit.nasaAPOD

scrape_gradio_datamain.tsx2 matches

@mattx•Updated 1 year ago
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
2
3export const scrape_gradio_data = async (url) => {
4 const cheerio = await import("npm:cheerio@1.0.0-rc.12");
5 const html = await fetchText(url);
6 const $ = cheerio.load(html);
7 // This is the part most likely to break:

mathFactmain.tsx2 matches

@hetzelhouse•Updated 1 year ago
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
2
3// Random math fact
4export let mathFact = fetchText(
5 "http://numbersapi.com/random/math"
6);

fetchPelotonDatamain.tsx3 matches

@andreterron•Updated 1 year ago
2import process from "node:process";
3import { pelotonUserId } from "https://esm.town/v/andreterron/pelotonUserId";
4import { fetchPelotonWorkouts } from "https://esm.town/v/andreterron/fetchPelotonWorkouts";
5
6export const fetchPelotonData = async () =>
7 await Promise.all(
8 (
9 await fetchPelotonWorkouts(
10 pelotonUserId,
11 process.env.pelotonSessionId

githubReposmain.tsx2 matches

@jswank•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// GitHub repos
4export let githubRepos = fetchJSON(
5 "https://api.github.com/users/stevekrouse/repos"
6);

getWttrmain.tsx2 matches

@LavaC•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let getWttr = async ({ location }) => {
15 });
16 }
17 let response = await fetch(`https://wttr.in/${location}.png?lang=zh-cn&m&t`, {
18 headers: {
19 "Content-Type": "image/png",

sendLarkMessagemain.tsx2 matches

@tzq•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3
4export async function sendLarkMessage(message) {
5 return fetch(process.env.larkRobotUrl, {
6 method: "POST",
7 headers: {

randomRSSTitlemain.tsx2 matches

@csshsh•Updated 1 year ago
1import { fetchRSS } from "https://esm.town/v/stevekrouse/fetchRSS?v=12";
2
3export const randomRSSTitle = async (url: string): Promise<unknown> => {
4 const response = await fetchRSS(
5 "http://www.techmeme.com/feed.xml"
6 );

fetchPaginatedData2 file matches

@nbbaier•Updated 2 weeks ago

FetchBasic1 file match

@fredmoon•Updated 2 weeks ago