1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export async function testSemantics({
8 api: string;
9}) {
10 const { data: last } = await fetchJSON(
11 `${api}/eval/${stateName}`
12 );
13 const now = Date.now();
14 await fetchJSON(`${api}/eval/${stateName} = ${now}`);
15 const { data: next } = await fetchJSON(
16 `${api}/eval/${stateName}`
17 );
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText";
2
3export const jsonresumeEx = (async () => {
4 let { render } = await import("npm:jsonresume-theme-standard-resume");
5 return render(
6 await fetchText(
7 "https://gist.githubusercontent.com/thomasdavis/c9dcfa1b37dec07fb2ee7f36d7278105/raw/b7c543a5de99d9bed90ca4fe5e506f8c0b04f77f/resume.json",
8 ),
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function getValIp() {
4 let req = await fetch("http://whatismyip.akamai.com");
5 let ip = await req.text();
6 return ip;
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let getBodyFromURL = async (url) => {
5 "https://deno.land/x/deno_dom/deno-dom-wasm.ts"
6 );
7 // Fetch HTML from the specified URL
8 const response = await fetch(url);
9 const html = await response.text();
10 // Parse the HTML into a new document
8 if (check) {
9 check = Object.assign({
10 fetch_limit: 10,
11 force: false,
12 enable_toggle: Boolean(toggleSubreddits),
18 filters: check.filters,
19 current_state: checkRedditState,
20 fetch_limit: check.fetch_limit,
21 enable_toggle: check.enable_toggle,
22 force: check.force,
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
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";
2import { handleFetchTextResponse } from "https://esm.town/v/devdoshi/handleFetchTextResponse";
3
4export let subscribeToPush = async (req: express.Request, res: express.Response) => {
11 GET: {
12 "/": async (req: express.Request, res: express.Response) => {
13 const response = await fetch(
14 `https://raw.githubusercontent.com/pirminrehm/service-worker-web-push-example/main/client${
15 req.path.substring(`/ui`.length)
16 }`,
17 ).then(handleFetchTextResponse);
18 const contentTypeMapping = {
19 "html": "text/html",
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
2
3export let mathFact = fetchText(
4 "http://numbersapi.com/random/math",
5);
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3let { aleister_chatley_countdown } = await import("https://esm.town/v/scio/aleister_chatley_countdown");
63 prompts.philip_k_dick,
64 );
65 await fetch(process.env.DISCORD_WEBHOOK_ALEISTERCHATLEY, {
66 method: "POST",
67 mode: "cors",
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let fetchJSON = async (url: string, options?: any) => {
4 let f = await fetch(url, {
5 ...options,
6 headers: {