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=1044&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 11070 results for "fetch"(2708ms)

convertPcmCovid19Listmain.tsx1 match

@aeaton•Updated 1 year ago
1export const convertPcmCovid19List = async () => {
2 const { csv } = await import("https://cdn.skypack.dev/d3-fetch@3");
3 const data = await csv(
4 "https://www.ncbi.nlm.nih.gov/core/assets/pmc/files/removed_phe_articles_oa_subset.csv",

apimain.tsx1 match

@ayrtonlacerda•Updated 1 year ago
23 });
24 });
25 return app.fetch(req);
26};

gitHubStarsmain.tsx3 matches

@vtdocs•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const gitHubStars = (async () => {
4 const username = "stevekrouse";
5 const user = await fetchJSON(
6 `https://api.github.com/users/${username}`,
7 );
10 let pages = Math.ceil(user.public_repos / 100);
11 while (pages--) {
12 const repositories = await fetchJSON(
13 `https://api.github.com/users/${username}/repos?per_page=100&page=${
14 pages + 1

girafemain.tsx2 matches

@dot•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function girafe() {
8 let party_size = "2";
9
10 let response = await fetch(
11 `https://www.sevenrooms.com/api-yoa/availability/widget/range?venue=${venue}&time_slot=${time_slot}&party_size=${party_size}&halo_size_interval=5&start_date=${start_date}&num_days=1&channel=SEVENROOMS_WIDGET`
12 );

getRSSmain.tsx2 matches

@ianv•Updated 1 year ago
1import { fetchRSS } from "https://esm.town/v/stevekrouse/fetchRSS?v=12";
2
3export let getRSS = fetchRSS("https://milkyeggs.com/feed/");

listValsmain.tsx3 matches

@pomdtr•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function listVals(req: Request) {
29 });
30 }
31 const resp = await fetch(
32 `https://api.val.town/v1/search/vals?query=${query}`,
33 );
63 case "view-val": {
64 const { id } = args;
65 const resp = await fetch(`https://api.val.town/v1/vals/${id}`);
66 if (!resp.ok) {
67 return resp;

mathFactmain.tsx2 matches

@hultner•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);

getmain.tsx2 matches

@cyx•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function get() {
15 let jobs = await Promise.all(
16 places.map(async (place) => {
17 await fetch(place.url, {
18 method: "GET",
19 })

aqimain.tsx2 matches

@sina•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export let aqi = async () => {
4 let pm25 = (
5 await fetchJSON(
6 "https://api.openaq.org/v2/latest?" +
7 new URLSearchParams({

scrapeWebsitemain.tsx2 matches

@oca99•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function scrapeWebsite(url) {
5 "https://deno.land/x/deno_dom@v0.1.38/deno-dom-wasm.ts"
6 );
7 const response = await fetch(url);
8 const html = await response.text();
9 var parser = new DOMParser();

fetch_template2 file matches

@gwoods22•Updated 4 hours ago

HN-fetch-call3 file matches

@ImGqb•Updated 1 day ago
fetch HackerNews by API