Search

Results include substring matches and semantically similar vals. Learn more
ooo_ooo_oooooh avatar
doesAdamSux
@ooo_ooo_oooooh
An interactive, runnable TypeScript val by ooo_ooo_oooooh
Script
export function doesAdamSux() {
return "Yes stupid.";
Akshat1236 avatar
wonderfulAquaEmu
@Akshat1236
An interactive, runnable TypeScript val by Akshat1236
HTTP
export default async function(req: Request): Promise<Response> {
return Response.json({ ok: true });
janpaul123 avatar
valle_tmp_418674886600415720477086592392646
@janpaul123
// This val will respond to HTTP requests with a simple "Hello, world!" message.
HTTP
// This val will respond to HTTP requests with a simple "Hello, world!" message.
export default async function main(req: Request): Promise<Response> {
return new Response("Hello, world!");
fahmi avatar
accessibleScarletToad
@fahmi
An interactive, runnable TypeScript val by fahmi
HTTP
export default async function(req: Request): Promise<Response> {
const url =
"https://script.google.com/macros/s/AKfycbwzkp9Nr29pws2ShKq9ZlI1W-DaLmKBJbGBk8kYuw4bOkmyWvgdE7E6M5d6YwUITekf/exec";
dhvanil avatar
val_GdQyHIp24O
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export default async function handler(req) {
try {
const result = await (async () => {
tr3ntg avatar
publicDocumentEditor
@tr3ntg
An interactive, runnable TypeScript val by tr3ntg
Script
export async function publicDocumentEditor(
req: express.Request,
res: express.Response,
let html =
table:{class:Table,inlineToolbar:!0,shortcut:'CMD+ALT+T'},},data:{},onReady:function(){saveButton.click()},onChange:function(
res.send(html);
Itumeleng_Randy_Malau avatar
beamingEmeraldSloth
@Itumeleng_Randy_Malau
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
rate: "$150/session"
function CommuniZEN() {
const [activeSection, setActiveSection] = useState('dashboard');
cursor: 'pointer'
function client() {
createRoot(document.getElementById("root")).render(<CommuniZEN />);
client();
export default async function server(request: Request): Promise<Response> {
return new Response(`
janpaul123 avatar
valle_tmp_50449610377968496666839612547843
@janpaul123
// This val serves an HTML page emulating a Hacker News clone.
HTTP
// This val serves an HTML page emulating a Hacker News clone.
// Titles are clickable and lead to a page with fake story content.
export default async function(req: Request): Promise<Response> {
const url = new URL(req.url);
const pathname = url.pathname;
jdan avatar
fetchWebpage
@jdan
An interactive, runnable TypeScript val by jdan
Script
import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=6";
export async function fetchWebpage(args: { url: string }) {
const { url } = args;
const html = await fetchText(args.url);
richi1969 avatar
AboutNoelandLiam
@richi1969
@jsxImportSource https://esm.sh/react
HTTP
import { createRoot } from "https://esm.sh/react-dom/client";
function FAQ({ question, answer }) {
const [isOpen, setIsOpen] = useState(false);
</div>
function GallagherArticle() {
const faqs = [
</div>
function client() {
createRoot(document.getElementById("root")).render(<GallagherArticle />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
return new Response(`
nlnw avatar
frame
@nlnw
Minimal val.town Farcaster Frame example. It supports dynamic image generation with Satori and ReSVG, and it's compatible with the Open Frames standard.
HTTP
import satori from "npm:satori";
const app = new Hono();
async function renderImage(s: string, color: string) {
const fontArrayBuf = await fetch(
"https://cdn.jsdelivr.net/npm/roboto-font@0.1.0/fonts/Roboto/roboto-regular-webfont.ttf",
stevekrouse avatar
satisfiedPinkAnteater
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
HTTP
export default async function (req: Request): Promise<Response> {
return Response.json({ ok: true })
vtdocs avatar
webscrapeWikipediaIntro
@vtdocs
An interactive, runnable TypeScript val by vtdocs
HTTP
const cheerio = await import("npm:cheerio");
const html = await fetchText(
"https://en.wikipedia.org/wiki/OpenAI",
const $ = cheerio.load(html);
// Cheerio accepts a CSS selector, here we pick the second <p>
valtism avatar
myApi
@valtism
An interactive, runnable TypeScript val by valtism
Script
export function myApi(name) {
return "hi " + name;
sergysergi avatar
myApi
@sergysergi
An interactive, runnable TypeScript val by sergysergi
Script
export function myApi(name) {
return "hi " + name;
โ€ฆ
123
โ€ฆ
Next