22Yet here I am, swamped with guilt. Despite my code running smoothly, the weight of my
23transgressions bears heavily upon me. I see the sneaky shortcuts in my code, each one a
24deceptively functional fetchProxy instance, and I can't help but feel like a sneaky
25impostor, a charlatan.
26
27I beseech you, val.town overlords, for guidance in my journey towards understanding and
28respecting the limitations of fetchProxy. May the power of async and await continue to
29guide me, and may I resist the seductive whispers of unsupported, yet seemingly functional,
30concurrency.
31
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export async function TodayForTyler(req: express.Request, res: express.Response) {
4 const { activity } = await fetchJSON(
5 "https://www.boredapi.com/api/activity",
1export function msAgo(ms) {
2 return new Date(Date.now() - ms);
3}
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function fetchFigmaFile(apiToken, fileKey) {
4 const url = `https://api.figma.com/v1/files/${fileKey}`;
5 const response = await fetch(url, {
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
A helper function to build a file's email
Simple functional CSS library for Val Town
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.
import { OpenAI } from "https://esm.town/v/std/openai";
export default async function(req: Request): Promise<Response> {
if (req.method === "OPTIONS") {
return new Response(null, {
headers: {
"Access-Control-Allow-Origin": "*",