1export function myApi(name) {
2 return "hi " + name;
3}
3/*
4# Email alerts when air is unhealthy near you */
5export async function aqi() {
6 const location = "alamo square, sf"; // **<-- change to place, city, or zip code**
7 const data = await easyAQI({ location });
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function runHnBotTask(interval) {
4 console.log("interval", interval);
5
1export function myApi(name) {
2 return "hi " + name;
3}
3import { parentReference } from "https://esm.town/v/stevekrouse/parentReference";
4
5export async function dlock({ id, ttl, release, lease }: {
6 id?: string;
7 ttl?: number;
1let { threadsafeStateEx } = await import("https://esm.town/v/stevekrouse/threadsafeStateEx");
2
3export async function updateThreadsafeStateEx({ lease, state }) {
4 // TODO confirm it's me updating the state using auth
5 if (lease > threadsafeStateEx.lease) {
14 const importObj = {};
15 const { instance } = await WebAssembly.instantiate(source.buffer, importObj);
16 const addTwo = instance.exports.addTwo as CallableFunction;
17 return addTwo(20, 31);
18})();
1export function svgAnimation(req: express.Request, res: express.Response) {
2 res.set("content-type", "image/svg+xml");
3 res.end(`<svg
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": "*",