Readme

Val Town API: Find a val by handle and name

This val fetches itself via the Val Town API! Weird, right?

1
2
3
4
5
6
7
8
import { fetch } from "https://esm.town/v/std/fetch";
export let valTownApiExampleVal = (async () => {
const response = await fetch(
`https://api.val.town/v1/alias/tmcw/valTownApiExampleVal`,
);
return await response.json();
})();
👆 This is a val. Vals are TypeScript snippets of code, written in the browser and run on our servers. Create scheduled functions, email yourself, and persist small pieces of data — all from the browser.