Search
searchTweets
@andreterron
An interactive, runnable TypeScript val by andreterron
Script
import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
export async function searchTweets({ accessToken, query, params }: {
accessToken: string;
query: string;

quaintBeigeCaribou
@stevekrouse
WinSky BlueSky frontend that resembles an early 2000s forum
HTTP
import React, { useCallback, useEffect, useState } from "https://esm.sh/react@18.3.1";
function App() {
const [agent, setAgent] = useState<AtpAgent | null>(null);
</div>
function client() {
createRoot(document.getElementById("root")!).render(<App />);
return response || fetch(event.request);
export default async function server(request: Request): Promise<Response> {
const url = new URL(request.url);
harryPotterData
@byzantine_emperor
// when a request comes in fetch hpotter data
Script
import { fetch } from "https://esm.town/v/std/fetch";
// when a request comes in fetch hpotter data
export async function harryPotterData(req: express.Request, res) {
try {
const responseData = await fetch(
SQL_Developer
@FortiBYOD
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
// Utility function to generate avatar
function generateAvatar(username) {
function App() {
async function submitJob(e) {
async function submitMessage(e) {
function handleUsernameSubmit(e) {
function renderUsernameModal() {
function renderJobs() {
function renderChat() {
function client() {
similarSites
@peterzakin
An interactive, runnable TypeScript val by peterzakin
Script
const exaSecret = Deno.env.get("EXA_API_KEY");
const exa = new Exa(exaSecret);
const similarSites = async function(url: string) {
const results = await exa.findSimilar(url);
if (results.results) {
dailyDadJoke
@sieteunoseis
Daily Dad Joke How do you make a programmer laugh every morning? A dad joke cron job! Setup Fork this val Click Create fork 🤣🤣🤣🤣 API This val uses the icanhazdadjoke API . You can find more docs here , such as how to filter by type .
HTTP
import { email } from "https://esm.town/v/std/email";
import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
export async function dailyDadJoke() {
let { setup, punchline } = await fetchJSON("https://official-joke-api.appspot.com/random_joke");
return punchline;
instagramExtract
@wolf
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
function App() {
const [url, setUrl] = useState("");
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") client();
export default async function server(request: Request): Promise<Response> {
const instagramPostExtract =
polishedCoffeeSloth
@obenga24
// 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?",
calendlyThisWeekEvents
@ejfox
* This API integrates with Calendly to fetch personal events for the current week.
* It returns the events as raw JSON.
*
* Note: This requires a Calendly Personal Access Token to be set as an environment variable.
HTTP
* Note: This requires a Calendly Personal Access Token to be set as an environment variable.
// Server-side code
async function server(request: Request): Promise<Response> {
const calendlyToken = Deno.env.get('CALENDLY_TOKEN');
if (!calendlyToken) {
valentine
@demon1
Hello!!! Feel free to mess around with this val and make it your own :). Just click on "Fork" in the top right. You can change the phrases that show up as you click no, you can change the firstImg and secondImg, maybe even add more images. And you can also change the colors and any of the text on the screen! Have fun with it and hopefully your crush says yes hehe.
HTTP
"i can be your baby :(",
function App() {
const [noClicks, setNoClicks] = useState(0);
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
return new Response(
valle_tmp_161829582363021365248633116958786
@janpaul123
// This val will serve a basic HTML wordle game with very colorful and animated CSS.
HTTP
let currentRow = 0;
const rows = [['', '', '', '', ''], ['', '', '', '', ''], ['', '', '', '', ''], ['', '', '', '', ''], ['', '', '', '', ''], ['', '', '', '', '']];
function updateBoard() {
let html = '';
for (row of rows) {
</body>
</html>
export default function main(): Response {
return html(<WebPage />);
readmeManager
@postpostscript
@postpostscript/readmeManager: Edit Val Readmes With Persistent Drafts edit this readme Todo: [ ] Upload images [ ] Autosave/save without reloading page [ ] Ctrl+S [ ] Multiple draft versions [ ] Switch to dark codemirror theme which has markdown styling [ ] Allow for checking checkboxes in preview [ ] View with just the preview [ ] Ability to favorite vals on the Home page
HTTP
import debounce from 'https://esm.sh/debounce';
async function render(text) {
window.result.innerHTML = await marked.parse(text);
</html>,
function getUserInfo(c: Context<HonoEnv>) {
const qs = new URLSearchParams();
</a>
async function getVals() {
const { id } = await api(`/v1/me`, {
parse_github_email
@wittjosiah
An interactive, runnable TypeScript val by wittjosiah
Script
export function parse(email: Email) {
const name = email.from.split(" <")[0];
const bot = name.includes("[bot]");
convertResume
@iamseeley
convert your resume content to the json resume standard
HTTP
export default async function convertResume(req: Request): Promise<Response> {
const html = `
import { hostResume } from 'https://esm.town/v/iamseeley/hostResume';
document.getElementById('resumeForm').addEventListener('submit', async function(event) {
event.preventDefault();
const resumeContent = document.getElementById('resumeContent').value;
const apiKey = '${Deno.env.get("OPENAI_API_KEY")}';
const spinner = document.getElementById('spinner');
document.getElementById('copyButton').addEventListener('click', () => copyToClip('jsonOutput'));
document.getElementById('hostButton').addEventListener('click', async function() {
const jsonOutput = document.querySelector('#jsonOutput').innerText;
snake_game
@mahictn
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
const INITIAL_SNAKE = [{ x: 10, y: 10 }];
function SnakeGame() {
const [snake, setSnake] = useState(INITIAL_SNAKE);
useEffect(() => {
async function fetchHighScore() {
const { blob } = await import("https://esm.town/v/std/blob");
if (score > highScore) {
async function updateHighScore() {
const { blob } = await import("https://esm.town/v/std/blob");
}, [score, highScore]);
function generateFood() {
return {
</div>
function client() {
createRoot(document.getElementById("root")).render(<SnakeGame />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
return new Response(`