13];
14
15function App() {
16 const [noClicks, setNoClicks] = useState(0);
17 const [isValentine, setIsValentine] = useState(false);
98}
99
100function client() {
101 createRoot(document.getElementById("root")).render(<App />);
102}
103if (typeof document !== "undefined") { client(); }
104
105export default async function server(request: Request): Promise<Response> {
106 return new Response(
107 `
13];
14
15function App() {
16 const [noClicks, setNoClicks] = useState(0);
17 const [isValentine, setIsValentine] = useState(false);
98}
99
100function client() {
101 createRoot(document.getElementById("root")).render(<App />);
102}
103if (typeof document !== "undefined") { client(); }
104
105export default async function server(request: Request): Promise<Response> {
106 return new Response(
107 `
13];
14
15function App() {
16 const [noClicks, setNoClicks] = useState(0);
17 const [isValentine, setIsValentine] = useState(false);
98}
99
100function client() {
101 createRoot(document.getElementById("root")).render(<App />);
102}
103if (typeof document !== "undefined") { client(); }
104
105export default async function server(request: Request): Promise<Response> {
106 return new Response(
107 `
4import React from "https://esm.sh/react@18.2.0";
5
6function App() {
7 const draw = {
8 hidden: { pathLength: 0, opacity: 0 },
128}
129
130function client() {
131 ReactDOM.createRoot(document.getElementById("root")!).render(<App />);
132}
133if (typeof document !== "undefined") { client(); }
134
135export default async function server(request: Request): Promise<Response> {
136 return new Response(
137 `
91};
92
93export default async function server(request: Request): Promise<Response> {
94 const url = new URL(request.url);
95 const searchParams = url.searchParams;
4import { blob } from "https://esm.town/v/std/blob";
5
6export async function updateNews(sources: string[], newsBlob: string = "news", descMaxLength: number = 400) {
7 // Update news stored in a blob
8
26}
27
28async function fetchSource(url: string, oldItems: any, descMaxLength: number) {
29 // Fetch a source, filter unseen news items
30 console.log(`fetch: ${url}`);
31
32 function parseDescription(description: string, maxlength: number) {
33 // Format a news item description
34
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}
2import { valTownBlogJSON } from "https://esm.town/v/stevekrouse/valTownBlogJSON";
3
4export async function valTownBlogRSS() {
5 const json = await valTownBlogJSON();
6 return new Response(dataToRSS(
1// @public
2export async function GET() {
3 return new Response(html, {
4 headers: {
1
2// @public
3export async function GET() {
4 return new Response(html, {
5 headers: {
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": "*",