1export function myApi(name) {
2 return "hi " + name;
3}
1import { scriptTag } from "https://esm.town/v/liamdanielduffy/scriptTag";
2
3export function addReactFromCDN(): string {
4 const reactDom = scriptTag({
5 src: "https://unpkg.com/react-dom@18.2.0/umd/react-dom.production.min.js",
1export function myApi(name) {
2 return JSON.parse(
3 '{"code": 0,"message": "success","data": {"param1": "va success"}}',
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function wttrJson(location: string) {
4 // https://github.com/chubin/wttr.in#json-output
5 return (await fetch(`https://wttr.in/${location}?format=j1`)).json();
1import { fetchXML } from "https://esm.town/v/stevekrouse/fetchXML?v=3";
2
3export const bggTest = async function () {
4 const xml = await fetchXML(
5 "https://boardgamegeek.com/xmlapi2/plays?username=acciopatronus",
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export async function raw(val: `@${string}.${string}`) {
4 const [owner, name] = val.slice(1).split(".") as string[];
5 return fetchJSON(
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function run(
4 { username, valName, data, token }: Params,
5): Promise<Result> {
1export function myApi(name) {
2 return "hi " + name;
3}
1export function getRotationFromFFmpegDisplayMatrixString(str: string) {
2 let elements = str.match(/[-+]?\d+/g)?.map(Number) || [];
3 if (elements.length !== 9) {
2import process from "node:process";
3
4export async function handleSanguineGithubWebhook(
5 req: express.Request,
6 res: express.Response,
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.