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/image-url.jpg?q=fetch&page=1261&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 13471 results for "fetch"(1983ms)

rlimitmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2import { parentReference } from "https://esm.town/v/stevekrouse/parentReference";
3
13 key = parent.userHandle + "." + parent.valName;
14 }
15 const limit = await fetchJSON(
16 `https://rlimit.com/${namespace}/${type}/${max}/${interval}/${key}`,
17 );

uidmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { handle } from "https://esm.town/v/stevekrouse/handle";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export let uid =
5 (await fetchJSON(
6 `https://api.val.town/v1/alias/${handle}`,
7 )).id;

fetchTablemain.tsx3 matches

@stevekrouse•Updated 1 year ago
1import { parseTable } from "https://esm.town/v/stevekrouse/parseTable";
2import { fetchText } from "https://esm.town/v/stevekrouse/fetchText";
3
4export let fetchTable = (url) =>
5 fetchText(url).then(parseTable);

githubFollowingmain.tsx2 matches

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

getGithubStarsForRepomain.tsx2 matches

@joey•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Returns stars on Github repo
6// username, project name from url: github.com/joeroddy/bridg
7export const getGithubStarsForRepo = async (username: string, project: string) => {
8 const res = await fetchJSON(
9 `https://api.github.com/repos/${username}/${project}`
10 );

holidaysUSmain.tsx2 matches

@rjeli•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Public holidays in the US in 2023
4export let holidaysUS = fetchJSON(
5 "https://date.nager.at/api/v2/publicholidays/2023/US"
6);

nasaAPODmain.tsx2 matches

@hkg•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

getAllVideosInYoutubePlaylistmain.tsx1 match

@supersayan•Updated 1 year ago
33 console.log(
34 length
35 ? `Successfully fetched ${length} video${length === 1 ? "" : "s"}`
36 : "No videos found",
37 );

proxyFetch8main.tsx5 matches

@alp•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const proxyFetch8 = async (req, res) => {
4 const { url, options } = req.body;
5 try {
6 const response = await fetch(url, options);
7 return res.status(response.status).send(await response.text());
8 } catch (e) {
9 const errorMessage = e instanceof Error ? e.message : "Unknown error";
10 console.error("Failed to initiate fetch", e);
11 return res.status(500).send(`Failed to initiate fetch: ${errorMessage}`);
12 }
13};

thedyslexicdeveloperTikTokmain.tsx2 matches

@chrislaughlin•Updated 1 year ago
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
2
3export const thedyslexicdeveloperTikTok = (async () => {
4 const cheerio = await import("npm:cheerio");
5 const html = await fetchText(
6 `https://www.tiktok.com/@thedyslexicdeveloper`,
7 );

GithubPRFetcher

@andybak•Updated 2 days ago

proxiedfetch1 file match

@jayden•Updated 3 days ago