14}
15
16function App() {
17 const [messages, setMessages] = useState<Message[]>([]);
18 const [newMessage, setNewMessage] = useState("");
92}
93
94function client() {
95 createRoot(document.getElementById("root")!).render(<App />);
96}
100}
101
102async function server(request: Request): Promise<Response> {
103 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
104 const SCHEMA_VERSION = 1;
1export async function fileToDataURL(file: File) {
2 const base64String = await fileToBase64(file);
3
9}
10
11export async function fileToBase64(file: File) {
12 // Read the file as an ArrayBuffer
13 const arrayBuffer = await file.arrayBuffer();
159];
160
161function App() {
162 const [selectedTech, setSelectedTech] = useState([]);
163 const [showInventory, setShowInventory] = useState(false);
251}
252
253function client() {
254 createRoot(document.getElementById("root")).render(<App />);
255}
257if (typeof document !== "undefined") { client(); }
258
259async function server(request: Request): Promise<Response> {
260 return new Response(
261 `
14};
15
16function App() {
17 const [selectedTech, setSelectedTech] = useState({});
18
64}
65
66function client() {
67 createRoot(document.getElementById("root")).render(<App />);
68}
69if (typeof document !== "undefined") { client(); }
70
71async function server(request: Request): Promise<Response> {
72 return new Response(`
73 <!DOCTYPE html>
5const { author, name } = extractValInfo(import.meta.url);
6
7export async function forwarder(e: Email) {
8 let attachments: AttachmentData[] = [];
9 for (const f of e.attachments) {
5const { author, name } = extractValInfo(import.meta.url);
6
7export async function forwarder(e: Email) {
8 let attachments: AttachmentData[] = [];
9 for (const f of e.attachments) {
6);
7
8export async function uptimeCheck(url: string) {
9 let ok = true;
10 let reason: string;
33- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
34- [x] make result tables scrollable
35- [x] add export to CSV, and JSON (CSV and JSON helper functions written in [this val](https://www.val.town/v/nbbaier/sqliteExportHelpers). Thanks to @pomdtr for merging the initial version!)
36- [x] add listener for cmd+enter to submit query
1import { email } from "https://esm.town/v/std/email";
2
3export default async function(interval: Interval) {
4 await email({
5 subject: "This is your daily ping!",
165The jsDelivr CDN is highly available with over 110 locations in the world.
166
167You will then have access to the instantsearch function in the global scope (window).
168
169JavaScript
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.