1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export async function runAllTests({
19 results.push(
20 (
21 await fetchJSON(
22 `${api}/eval/@stevekrouse.${name}("${encodeURIComponent(api)}")`
23 )
1import { fetchDateMeProfiles } from "https://esm.town/v/stevekrouse/fetchDateMeProfiles";
2import { notifyNew } from "https://esm.town/v/stevekrouse/notifyNew";
3
6// Requires an upstash account: https://docs.val.town/persistence-databases/upstash
7export let dateMeNotify = notifyNew({
8 getData: fetchDateMeProfiles,
9 name: "Date Me Profile",
10});
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3// GitHub events
4export let githubEvents = fetchJSON(
5 "https://api.github.com/users/stevekrouse/events"
6);
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function pingReplit() {
4 fetch("https://bed.paperee.repl.co/");
5 fetch("https://school-work.paperee.repl.co/");
6}
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const proxyFetch7 = 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};
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Explore the Star Wars universe, from StarWarsAPI
4export let starWars = fetchJSON(
5 "https://swapi.dev/api/people/1/"
6);
17 const args = Array.from(formData.values()).map(Number);
18
19 fetch('https://api.val.town/v1/run/rodrigotello.multiplicationFunctionTest', {
20 method: 'POST',
21 headers: { 'Content-Type': 'application/json' },
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) =>
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;
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");