4import { blob } from "https://esm.town/v/std/blob?v=12";
5
6fetch("https://unicode.org/Public/UNIDATA/UnicodeData.txt").then(async function(response) {
7 const text = await response.text();
8 const data = {};
116export default app.fetch;
117
118export function showClicked() {
119 return "Button Clicked!";
120}
6);
7
8export async function uptimeCheck(url: string) {
9 let ok = true;
10 let reason: string;
18
19
20// in this example we use a custom function instead of htmx's custom sse extension, since it never closes!
21function getResponse({prompt}) {
22 const outputDiv = document.getElementById('output');
23 prompt = prompt ||document.getElementById('prompt').value;
97 <div id="output"></div>
98 <script>
99 // instead of htmx sse we pass it a custom function
100 ${getResponse}
101 </script>
6);
7
8export async function uptimeCheck(url: string) {
9 let ok = true;
10 let reason: string;
6);
7
8export async function uptimeCheck(url: string) {
9 let ok = true;
10 let reason: string;
4const query = "\"val.town\" OR \"val town\" -_ValTown_ -is:retweet";
5
6export async function twitterAlert({ lastRunAt }: Interval) {
7 const results = await twitterSearch({
8 query,
6);
7
8export async function uptimeCheck(url: string) {
9 let ok = true;
10 let reason: string;
1/** @jsxImportSource https://esm.sh/react */
2
3export function SparklineSVG({ strokeWidth, data, height, width, fill, stroke }) {
4 const padding = 2;
5 const xMargin = 25;
14 const yMid = (yMin + yMax) / 2;
15
16 // Scaling functions
17 const xScale = x => ((x - xMin) / (xMax - xMin)) * (width - 2 * padding) + padding + xMargin;
18 const yScale = y => height - padding - ((y - yMin) / (yMax - yMin)) * (height - 2 * padding);
3import { parseHTML } from "npm:linkedom@0.15";
4
5export default async function() {
6 const document = parseHTML("<a>").document;
7 const chart = Plot.plot({
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": "*",