1export function testHTML(req: express.Request, res: express.Response) {
2 res.send(
3 "<html lang='en'>" +
27 };
28
29 function setup() {
30 createCanvas(800, 300);
31 resetGame();
32 }
33
34 function resetGame() {
35 dino = new Dino();
36 obstacles = [];
41 }
42
43 function draw() {
44 if (isGameOver) {
45 showGameOver();
94 }
95
96 function keyPressed() {
97 if (keyCode === 32) {
98 if (isGameOver) {
107 }
108
109 function gameOver() {
110 isGameOver = true;
111 let name = prompt("Enter your name (max 16 characters, no spaces):");
113 scoreboard.push({ name, score });
114
115 // Call the function to update the scoreboard on the Val Town API
116 updateScoreboard(name, score);
117 }
118
119 function updateScoreboard(name, score) {
120 const apiUrl =
121 "https://api.val.town/v1/run/rodrigotello.updateDinoScoreboard";
147 }
148
149 function showGameOver() {
150 background(255);
151 textAlign(CENTER);
176 }
177
178 function showGamePaused() {
179 background(255);
180 textAlign(CENTER);
1import { fetchHtmlDom } from "https://esm.town/v/aeaton/fetchHtmlDom";
2
3export async function peelSessionLetters() {
4 const url = `https://www.bbc.co.uk/radio1/johnpeel/artists/`;
5 const dom = await fetchHtmlDom(url);
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
1export const test = (async function init() {
2 const res = await import("https://esm.sh/web-features/index.json") assert { type: "json" };
3 return res;
2import { getIssueNumber } from "https://esm.town/v/Timmy/getIssueNumber";
3
4export async function main() {
5 let latestIssue = 643;
6 const init = (async () => {
1export function myApi(name) {
2 return "hi " + name;
3}
1import { polygonDailyAPI } from "https://esm.town/v/rwev/polygonDailyAPI";
2
3export async function polygonPriceOnDate(ticker, isoDate) {
4 const response = await polygonDailyAPI(ticker, isoDate);
5 if (response.status != "OK")
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": "*",