3import { createRoot } from "https://esm.sh/react-dom/client";
4
5function App() {
6 const [file, setFile] = useState(null);
7 const [fileName, setFileName] = useState("");
131}
132
133function client() {
134 const root = document.getElementById("root");
135 if (root) {
142}
143
144export default async function server(request: Request): Promise<Response> {
145 return new Response(
146 `
3import { createRoot } from "https://esm.sh/react-dom/client";
4
5function App() {
6 const [file, setFile] = useState(null);
7 const [fileName, setFileName] = useState("");
131}
132
133function client() {
134 const root = document.getElementById("root");
135 if (root) {
142}
143
144export default async function server(request: Request): Promise<Response> {
145 return new Response(
146 `
1export default async function (req: Request): Promise<Response> {
2 if (req.method !== 'POST') {
3 return new Response('Please send a POST request with a file', { status: 405 });
1export default async function(req: Request): Promise<Response> {
2 const url = new URL(req.url);
3 const path = url.pathname.slice(1); // Remove leading slash
1export default async function(req: Request): Promise<Response> {
2 const url = new URL(req.url);
3 const path = url.pathname;
1export default async function(req: Request): Promise<Response> {
2 const now = new Date();
3 const hours = now.getHours().toString().padStart(2, "0");
12}
13
14function generateTimeAsciiArt(time: string): string {
15 const digits = {
16 "0": [
1export default async function (req: Request): Promise<Response> {
2 const asciiArt = `
3 _ _ _ _ __ __ _ _ _
3import { createRoot } from "https://esm.sh/react-dom/client";
4
5function TemperatureConverter() {
6 const [celsius, setCelsius] = useState('');
7 const [fahrenheit, setFahrenheit] = useState('');
46}
47
48function App() {
49 return (
50 <div className="container">
54}
55
56function client() {
57 const root = document.getElementById('root');
58 if (root) {
65}
66
67export default async function server(request: Request): Promise<Response> {
68 return new Response(`
69 <html>
3import { createRoot } from "https://esm.sh/react-dom/client";
4
5function AnalogClock({ time }) {
6 const hourMarks = Array.from({ length: 12 }, (_, i) => i);
7 const minuteMarks = Array.from({ length: 60 }, (_, i) => i);
38}
39
40function App() {
41 const [time, setTime] = useState(new Date());
42
61}
62
63function client() {
64 const root = document.getElementById('root');
65 if (root) {
72}
73
74export default async function server(request: Request): Promise<Response> {
75 return new Response(`
76 <html>
156 transform: rotate(90deg);
157 transition: all 0.05s;
158 transition-timing-function: cubic-bezier(0.1, 2.7, 0.58, 1);
159}
160
3import { createRoot } from "https://esm.sh/react-dom/client";
4
5function App() {
6 const [time, setTime] = useState(new Date());
7
30}
31
32function client() {
33 const root = document.getElementById('root');
34 if (root) {
41}
42
43export default async function server(request: Request): Promise<Response> {
44 return new Response(`
45 <html>
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.