1export default function({ component, sourceURL, head }: { component: Function; sourceURL: string; head?: string }) {
2 return new Response(
3 `<html>
78});
79
80function clientScript() {
81 // Set the timezone input
82 const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
96}
97
98function Cron({ cron, timezone }) {
99 let translation;
100 try {
291
292
293 // Helper function to get the supported MIME type
294 function getSupportedMimeType() {
295 const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
296 const mimeTypes = [
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export async function getWeather(location: string): Promise<WeatherResponse> {
4 return fetchJSON(`https://wttr.in/${location}?format=j1`);
5}
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export async function getWeather(city: string): Promise<WeatherResponse> {
4 return fetchJSON(`https://wttr.in/${city}?format=j1`);
5}
4import RssParser from "npm:rss-parser";
5
6export async function rssNotify() {
7 const lastRunAt = await blob.getJSON(getLegacyImportUrl(import.meta.url));
8 console.log(`Last run: ${lastRunAt || "Never"}`);
2import { email } from "https://esm.town/v/std/email";
3
4export async function testEmail2(e: {
5 from: string;
6 to: string[];
25 tables: string[];
26};
27function parseOptions(params: URLSearchParams): GenerateOptions {
28 const camelCase = params.has("camelCase") ? params.get("camelCase") === "true" : undefined;
29 const excludePattern = params.get("excludePattern") ?? undefined;
43 };
44}
45export default async function(req: Request): Promise<Response> {
46 const url = new URL(req.url);
47 if (url.pathname !== "/") return new Response(null, { status: 404 });
1export function handler(request: Request) {
2 return Response.json({ ok: true });
3}
1function run() {
2 Array.from(document.querySelectorAll(":has(> div > [aria-label^=Forked])"))
3 .map(el => el.style.cssText = "border: 2px solid red;");
Simple functional CSS library for Val Town
A helper function to build a file's email
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.