1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export function resend({ from, to, subject, html, text, apiKey }: {
4 from: string;
5 to: string;
1export function signECDSA(message, key) {
2 let encoded = new TextEncoder().encode(message);
3 return crypto.subtle.sign(
3import { verifyAPIAuth } from "https://esm.town/v/stevekrouse/verifyAPIAuth";
4
5export async function updateInspoList(newList, auth) {
6 let handle = await verifyAPIAuth(auth);
7 if (isValTownTeam(handle)) {
1export function generic<A>(
2 arr: A[],
3 criteria: (a: A) => string
2import { messages } from "https://esm.town/v/stevekrouse/messages";
3
4export function notifyNewMessages() {
5 if (messages.length > messagesLengthLast)
6 console.email(
1// View at https://fallenmax-greeting.express.val.run?name=myName
2export async function greeting(req: express.Request, res: express.Response) {
3 const name = String(req.query.name);
4 const text = `Hello ${name}`;
2import { ruleAndroidAppsCheck } from "https://esm.town/v/xuangong/ruleAndroidAppsCheck";
3
4export async function testAndroidBingApps() {
5 const { default: axios } = await import("npm:axios");
6 const url =
1import { myApi as myApi2 } from "https://esm.town/v/parweb/myApi";
2
3export function myApi(name) {
4 return myApi2("chris");
5}
3// Send a pushover message.
4// token, user, and other opts are as specified at https://pushover.net/api
5export async function pushover({ token, user, message, title, url, ...opts }) {
6 return await fetch("https://api.pushover.net/1/messages.json", {
7 method: "POST",
1export function myApi(name) {
2 return "hello " + 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": "*",