Search

Results include substring matches and semantically similar vals. Learn more
paperee avatar
pingReplit
@paperee
An interactive, runnable TypeScript val by paperee
Cron
import { fetch } from "https://esm.town/v/std/fetch";
export async function pingReplit() {
fetch("https://bed.paperee.repl.co/");
fetch("https://school-work.paperee.repl.co/");
dhvanil avatar
val_U4m66UKKNC
@dhvanil
An interactive, runnable TypeScript val by dhvanil
Script
export default async function handler(req) {
try {
const result = await (async () => {
eric avatar
pocket
@eric
An interactive, runnable TypeScript val by eric
Script
export function pocket() {
return {
get greeting() { return 'hi there' }
dhvanil avatar
val_WnFa6T543m
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export default async function handler(req) {
try {
const result = await (async () => {
triptych avatar
myApi
@triptych
An interactive, runnable TypeScript val by triptych
HTTP
export function myApi(name) {
return "hi " + name;
yawnxyz avatar
googleiframeembed
@yawnxyz
An interactive, runnable TypeScript val by yawnxyz
HTTP
export default async function (req: Request): Promise<Response> {
const html = `
<!DOCTYPE html>
dhvanil avatar
val_PmJtq5HUb4
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_PmJtq5HUb4(req) {
try {
// Execute the code directly and capture its result
mxstbr avatar
myApi
@mxstbr
An interactive, runnable TypeScript val by mxstbr
Script
export function myApi(name) {
return "hi " + name;
dhvanil avatar
val_h9bfaRPWdY
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export default async function handler(req) {
try {
const result = await (async () => {
pomdtr avatar
sunbeamValTownFn
@pomdtr
Sunbeam integration for Val Town Installation First, install sunbeam . Then create a new val referencing this val. const sunbeamValtown = @pomdtr.sunbeamValTownFn(@me.secrets.valtown) then switch it's visibility to unlisted. You can then install your val in sunbeam # install the extension sunbeam extension install --alias valtown val:<username>/sunbeamValtown Usage sunbeam valtown # list your vals sunbeam valtown --help # list available commands Demo
HTTP
import { fetch } from "https://esm.town/v/std/fetch";
export function sunbeamValTownFn(valtownToken: string) {
return async (req: Request) => {
const { Hono } = await import("npm:hono");
webup avatar
getWebLoaderBuilder
@webup
An interactive, runnable TypeScript val by webup
Script
import process from "node:process";
export async function getWebLoaderBuilder(
url: string,
type: "webpage" | "github" | "audio" = "webpage",
dhvanil avatar
val_wfo03V3TpD
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export default async function handler(req) {
try {
const result = await (async () => {
whatrocks avatar
foo
@whatrocks
// email yourself as easily as logging to the console
Script
import { fetch } from "https://esm.town/v/std/fetch";
// email yourself as easily as logging to the console
export async function foo() {
const username = "whatrocks";
const today = new Date().toDateString();
SlugeR avatar
myApi
@SlugeR
An interactive, runnable TypeScript val by SlugeR
Script
export function myApi(count) {
return count + " dragons!";
janpaul123 avatar
valle_tmp_272229477861650756686636317711954
@janpaul123
// Initialize sample stories and store them in blob storage
HTTP
const SAMPLE_STORIES_KEY = "hn_realistic_sample_stories";
// Initialize sample stories and store them in blob storage
async function initializeSampleStories() {
const existingStories = await blob.getJSON(SAMPLE_STORIES_KEY);
if (!existingStories) {