Search
![bwaidelich avatar](https://images.clerk.dev/oauth_github/img_2O8cwCVPJF1WoYElnarmjQ38jJk.jpeg)
aqi
@bwaidelich
# Email alerts when air is unhealthy near you
Script
import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI?v=3";
# Email alerts when air is unhealthy near you */
export async function aqi() {
const location = "alamo square, sf"; // **<-- change to place, city, or zip code**
const data = await easyAQI({ location });
dbpedia
@ejfox
An API and basic interface for entity searching from DBPedia, enhanced with images
HTTP
// It provides a web interface and a JSON API endpoint for entity search, including hero images.
// Helper function to strip HTML tags and decode HTML entities
function sanitizeHtml(html: string): string {
const decoded = html.replace(/"/g, '"')
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
function App() {
const [query, setQuery] = useState("");
`curl 'https://ejfox-dbpedia.web.val.run/api/search${query ? `?query=${encodeURIComponent(query)}` : ''}'`
function client() {
createRoot(document.getElementById("root")).render(React.createElement(App));
if (typeof document !== "undefined") { client(); }
async function fetchDBpediaResults(query: string) {
const lookupResponse = await fetch(
return results;
async function server(request: Request): Promise<Response> {
const url = new URL(request.url);
web_P8gyKBQ5mq
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function web_P8gyKBQ5mq(req) {
return new Response(`<!DOCTYPE html>
<html>
![dng avatar](https://images.clerk.dev/oauth_github/img_2T7e8wFWmtcRbuXO2pE0NJ9n3YN.png)
myApi
@dng
An interactive, runnable TypeScript val by dng
Script
export function myApi(name) {
return "hi " + name;
val_uqeabFq23f
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_uqeabFq23f(req) {
try {
// Execute the code directly and capture its result
sqliteExplorerApp
@lecoto
SQLite Explorer View and interact with your Val Town SQLite data. It's based off Steve's excellent SQLite Admin val, adding the ability to run SQLite queries directly in the interface. This new version has a revised UI and that's heavily inspired by LibSQL Studio by invisal . This is now more an SPA, with tables, queries and results showing up on the same page. Install Install the latest stable version (v86) by forking this val: Authentication Login to your SQLite Explorer with password authentication with your Val Town API Token as the password. Todos / Plans [ ] improve error handling [ ] improve table formatting [ ] sticky table headers [x] add codemirror [ ] add loading indication to the run button (initial version shipped) [ ] add ability to favorite queries [ ] add saving of last query run for a table (started) [ ] add visible output for non-query statements [ ] add schema viewing [ ] add refresh to table list sidebar after CREATE/DROP/ALTER statements [ ] add automatic execution of initial select query on double click [x] add views to the sidebar [ ] add triggers to sidebar [ ] add upload from SQL, CSV and JSON [ ] add ability to connect to a non-val town Turso database [x] fix wonky sidebar separator height problem (thanks to @stevekrouse) [x] make result tables scrollable [x] add export to CSV, and JSON (CSV and JSON helper functions written in this val . Thanks to @pomdtr for merging the initial version!) [x] add listener for cmd+enter to submit query
HTTP
- [x] make result tables scrollable
- [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!)
- [x] add listener for cmd+enter to submit query
hiraganaWordBuilder
@ashryanio
@jsxImportSource https://esm.sh/react
HTTP
</div>
function HiraganaWordBuilder() {
const [currentWord, setCurrentWord] = useState({ romaji: "", hiragana: "" });
</div>
function App() {
return (
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
const url = new URL(request.url);
promptGen
@all
* This val creates a website that generates optimized prompts for Val Town based on user input.
* It uses the OpenAI API to generate prompts and incorporates a loading animation.
* The generated prompt is tailored to Val Town's specific features and best practices.
HTTP
* This val creates a website that generates optimized prompts for Val Town based on user input.
* It uses the OpenAI API to generate prompts and incorporates a loading animation.
* The generated prompt is tailored to Val Town's specific features and best practices.
"Email sending",
"OpenAI integration",
"React support",
"Web APIs",
function App() {
const [idea, setIdea] = useState("");
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
client();
async function server(request: Request): Promise<Response> {
const url = new URL(request.url);
if (url.pathname === "/generate" && request.method === "POST") {
const { OpenAI } = await import("https://esm.town/v/std/openai");
const openai = new OpenAI();
try {
const { idea } = await request.json();
const completion = await openai.chat.completions.create({
messages: [
create
@websandbox
An interactive, runnable TypeScript val by websandbox
Script
export async function create({ code, token }: { code: string; token: string }) {
const { error, details, url } = await (await fetch("https://websandbox-createAPI.web.val.run", {
body: JSON.stringify({ code, token }),
web_Oj5sZZxXOR
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function web_Oj5sZZxXOR(req) {
return new Response(`<!DOCTYPE html>
<html>
![csellis avatar](https://images.clerk.dev/oauth_github/img_2T9RIz8vagOlcxcNcKpooxEXaAv.jpeg)
myApi
@csellis
An interactive, runnable TypeScript val by csellis
Script
export function myApi(name) {
return "hi " + name;
![mluccone avatar](https://images.clerk.dev/oauth_github/img_2RT8dJpHa2Xt6cZX4kE2cv19Ldh.png)
myApi
@mluccone
An interactive, runnable TypeScript val by mluccone
Script
export function myApi(name) {
return "hi " + name;
myApi
@riodpp
An interactive, runnable TypeScript val by riodpp
Script
export function myApi(name) {
return "hi " + name;
dbpediaenhanced
@ejfox
An API and basic interface for entity searching from DBPedia, enhanced with images
HTTP
import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
function sanitizeHtml(html) {
return html ? html.replace(/<\/?[^>]+(>|$)/g, "") : "";
function calculateScore(result, query) {
let score = 0;
return { score, explanation };
function App() {
const [query, setQuery] = useState("");
`curl 'https://ejfox-dbpediaenhanced.web.val.run/api/search?query=${encodeURIComponent(query || "example")}'`
function client() {
createRoot(document.getElementById("root")).render(React.createElement(App));
if (typeof document !== "undefined") { client(); }
async function fetchDBpediaResults(query: string) {
const lookupResponse = await fetch(
return scoredResults;
async function server(request: Request): Promise<Response> {
const url = new URL(request.url);