Search

Results include substring matches and semantically similar vals. Learn more
eric avatar
untitled0045282
@eric
An interactive, runnable TypeScript val by eric
Script
import { getEmails } from "https://esm.town/v/eric/getEmails";
untitled0045282 = export async function asyncSubscribe() {
const s = await getEmails()
console.log(s)
Array.from(arguments).forEach(x => s.add(x))
await setEmails(s)
return emails.length
pdlieber avatar
untitled_aquaBird
@pdlieber
// Fetches a random joke.
Cron
// Fetches a random joke.
function fetchRandomJoke() {
const SAMPLE_JOKE = {
"setup": "What do you call a group of disorganized cats?",
"punchline": "A cat-tastrophe.",
return SAMPLE_JOKE;
const randomJoke = fetchRandomJoke();
const setup = randomJoke.setup;
const punchline = randomJoke.punchline;
// Sends an email with the joke.
stevekrouse avatar
untitled_XDKXKxQt
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
Script
import { hnFollow1 } from "https://esm.town/v/stevekrouse/hnFollow1";
export const untitled_XDKXKxQt = hnFollow1({ lastRunAt: new Date() });
dpetrouk avatar
untitled_silverKrill
@dpetrouk
An interactive, runnable TypeScript val by dpetrouk
Script
export let untitled_silverKrill = (name) => {
return `
<html>
<head></head>
<body>
<h1>${name}</h1>
</body>
</html>
shreyagarwal7924 avatar
untitled_cyanOctopus
@shreyagarwal7924
// Fetches a random joke.
Cron
// Fetches a random joke.
async function fetchRandomJoke() {
const response = await fetch(
"https://official-joke-api.appspot.com/random_joke",
return response.json();
const randomJoke = await fetchRandomJoke();
const setup = randomJoke.setup;
const punchline = randomJoke.punchline;
// Sends an email with the joke.
export const emailRandomJoke = email({
stevekrouse avatar
untitled_pinkRoundworm
@stevekrouse
Comments (just add water) A self-contained comments system Val. Just fork this val and you have a complete (but extremely minimal) comment system!
HTTP (deprecated)
# Comments (just add water)
A self-contained comments system Val. Just fork this val and you have a complete (but extremely minimal) comment system!
const KEY = import.meta.url.split("?")[0];
export async function addComment(str) {
const comments = await blob.getJSON(KEY) as Array<string> ?? [];
comments.push(str);
await blob.setJSON(KEY, comments);
await email({ text: "New Comment Alert!: " + str });
export async function getComments() {
return await blob.getJSON(KEY) as Array<string> ?? [];
stevekrouse avatar
untitled_harlequinIguana
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
HTTP (deprecated)
export let untitled_harlequinIguana = (req) => Response.json("hi");
stevekrouse avatar
untitled_graySwordtail
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
Script
import { curl } from "https://esm.town/v/stevekrouse/curl";
export let untitled_graySwordtail = curl(
"https://stevekrouse-pixel.express.val.run/track",
eric avatar
untitled6372775
@eric
An interactive, runnable TypeScript val by eric
Script
import { getEmails } from "https://esm.town/v/eric/getEmails";
untitled6372775 = export async function subscribe() {
const s = await getEmails()
console.log(s)
Array.from(arguments).forEach(x => s.add(x))
setEmails(s)
return emails.length
rsatheeshkumar avatar
untitled_azureTurtle
@rsatheeshkumar
An interactive, runnable TypeScript val by rsatheeshkumar
Script
export let untitled_azureTurtle = async () => {
const data = 5 + 2;
return data;
berto avatar
untitled5983442
@berto
An interactive, runnable TypeScript val by berto
Script
export let untitled5983442 = 1+1