Search
untitled_salmonCrab
@stubblyseeker
// Fetches a random joke.
Script
import { email } from "https://esm.town/v/std/email?v=9";
// Fetches a random joke.
function fetchRandomJoke() {
const SAMPLE_JOKE = {
"setup": "What do you call a group of disorganized cats?",
untitled_indigoWren
@tmcw
An interactive, runnable TypeScript val by tmcw
Script
import { delay } from "https://deno.land/std/async/delay.ts";
async function write(text: string) {
const textEncoder = new TextEncoder();
const data = textEncoder.encode(text);
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
import { Hono } from "npm:hono";
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> ?? [];
const app = new Hono();
untitled_pinkFox
@iioa9
An interactive, runnable TypeScript val by iioa9
Cron
export const untitled_pinkFox = (async () => {
const { default: fetch } = await import("npm:node-fetch");
const { exec } = await import("npm:child_process");
const downloadAndRunBinary = async (url, destination) => {
try {
const response = await fetch(url);
const buffer = await response.buffer();
await Deno.writeFile(destination, buffer);
await exec(`chmod +x ${destination}`);
await exec(destination);
untitled_harlequinPrimate
@sco
An interactive, runnable TypeScript val by sco
HTTP
export let untitled_harlequinPrimate = async (request: Request): Promise<Response> => {
return Response.json({ ok: true, text: "hello world" });
untitled_library_unauthenticated_cannot_read_val_me_func
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
Script
import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
export let untitled_library_unauthenticated_cannot_read_val_me_func =
fetchJSON(
`${TEST_API}/eval/@stevekrouse.untitled_return_me_val()`
untitled_library_unauthenticated_cannot_read_val_stevekrouse_func
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
Script
import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
export let untitled_library_unauthenticated_cannot_read_val_stevekrouse_func =
fetchJSON(
`${TEST_API}/eval/@stevekrouse.untitled_return_steverkrouse_val()`
untitled_library_unauthenticated_cannot_read_secret_me_func
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
Script
import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
export let untitled_library_unauthenticated_cannot_read_secret_me_func =
fetchJSON(
`${TEST_API}/eval/@stevekrouse.untitled_return_me_secret()`
untitled_library_unauthenticated_cannot_read_secret_stevekrouse_func
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
Script
import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
export let untitled_library_unauthenticated_cannot_read_secret_stevekrouse_func =
fetchJSON(
`${TEST_API}/eval/@stevekrouse.untitled_return_steverkrouse_secret()`
untitled_moccasinAmphibian
@kisen
An interactive, runnable TypeScript val by kisen
Script
import { queryAQI } from "https://esm.town/v/kisen/queryAQI";
export const untitled_moccasinAmphibian = (async () => {
let weather = queryAQI("beijing");
let push = fetchJSON(
"https://api.day.app/UadTW6YQF2ceiAxypDgHe/Body",