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/$%7Bart_info.art.src%7D?q=fetch&page=755&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 8145 results for "fetch"(1453ms)

peelSessionArtistsmain.tsx2 matches

@aeaton•Updated 1 year ago
1import { fetchHtmlDom } from "https://esm.town/v/aeaton/fetchHtmlDom";
2
3export async function peelSessionArtists(url) {
4 const dom = await fetchHtmlDom(url);
5 const items = dom.querySelectorAll(".link-list > li > a");
6 return [...items].map((link) =>

selfmain.tsx2 matches

@eralp•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let self = async () {
4 const response = await fetch("https://api.val.town/eval/@eralp.self")
5 const json = await response.json();
6 return json.data;

getIssueNumbermain.tsx2 matches

@Timmy•Updated 1 year ago
1import { fetchJavascriptWeeklyIssues } from "https://esm.town/v/Timmy/fetchJavascriptWeeklyIssues";
2
3export const getIssueNumber = (async () => {
5 "https://deno.land/x/deno_dom@v0.1.38/deno-dom-wasm.ts"
6 );
7 const domText = await fetchJavascriptWeeklyIssues;
8 const document = new DOMParser().parseFromString(domText, "text/html");
9 const divIssues = document.querySelector(".issue");

getReiseauskunftTrainmain.tsx2 matches

@hanbzu•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function getReiseauskunftTrain(url) {
12 return cleaned === "" ? undefined : cleaned;
13 }
14 return fetch(url)
15 .then((res) => res.text())
16 .then((html) => new DOMParser().parseFromString(html, "text/html"))

githubFollowersmain.tsx2 matches

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

getGithubUsermain.tsx2 matches

@vtdocs•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const getGithubUser = async (username: string) => {
4 const user = await fetchJSON(
5 `https://api.github.com/users/${username}`,
6 );

nameNationalitymain.tsx2 matches

@laionazeredo•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Predict the nationality of a name
4export let nameNationality = fetchJSON(
5 "https://api.nationalize.io/?name=michael"
6);

bbc6MusicSpotifyRedirectmain.tsx2 matches

@neverstew•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let bbc6MusicSpotifyRedirect = async (req: Request) => {
4 const response = await fetch("https://6music.sharpshooterlabs.com/");
5 const html = await response.text();
6 const rawUrl = html

elysiaExamplemain.tsx1 match

@neverstew•Updated 1 year ago
3 const app = new Elysia()
4 .get("/", () => "Hello Elysia");
5 return app.fetch(req);
6};

secretEndpointFailuremain.tsx2 matches

@neverstew•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const secretEndpointFailure = fetch(
4 "https://neverstew-secretEndpoint.web.val.run",
5);

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago