32 <script src="https://cdn.moderntreasury.com/compliance/v1/mt-onboarding.js"></script>
33 <script type="application/ecmascript">
34 function openIframe() {
35 const onSuccess = function (event) {
36 // handle success event (e.g. move user to the next step of your flow following KYC)
37 };
38
39 const onError = function (event) {
40 // handle error event (e.g. open the iframe again)
41 };
42
43 const onCancel = function (event) {
44 // handle cancel event (e.g. email the user later to try and reactivate them)
45 // note: this event will not be triggered if the user closes their browser.
1export function myApi(name) {
2 return "hi " + name;
3}
1export function testHTML(req: express.Request, res: express.Response) {
2 res.send(
3 "<html lang='en'>" +
1import { newRSSItems } from "https://esm.town/v/stevekrouse/newRSSItems?v=6";
2
3export async function pollRss({ lastRunAt }) {
4 const items = await newRSSItems({
5 url: "https://inkandswitch.com/index.html",
1export function myApi(name) {
2 return "hi " + name;
3}
28
29 console.log(
30 `average e2e user function time: ${(
31 userFuncTimes.reduce((a, b) => a + b, 0) / count
32 ).toFixed(0)}ms (fastest was ${userFuncTimes
1export async function sendEmail() {
2 console.email("hello", "val.town");
3}
1export function myApi(name) {
2 return "hi " + name;
3}
1export let handleFetchTextResponse = async function (response: Response) {
2 if (response.ok) {
3 return await response.text();
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
A helper function to build a file's email
Simple functional CSS library for Val Town
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": "*",
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.