Search

Results include substring matches and semantically similar vals. Learn more
vawogbemi avatar
notUberAccount
@vawogbemi
@jsxImportSource https://esm.sh/react@18.2.0
Script
import React from "https://esm.sh/react@18.2.0";
import { INSTANTDB_APP_ID } from "https://esm.town/v/vawogbemi/notUberConsts";
export function Account() {
const db = init({ appId: INSTANTDB_APP_ID });
const { signOut } = useAuth();
smail1 avatar
createMicrosoftOfficeOverview
@smail1
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
function App() {
const officeApps = [
</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(`
pomdtr avatar
readme
@pomdtr
An interactive, runnable TypeScript val by pomdtr
Script
import { gfm } from "https://esm.town/v/pomdtr/gfm";
export async function readmeToHtmlResponse(author: string, name: string) {
return new Response(await readmeToHtml(author, name), {
"Content-Type": "text/html",
export async function readmeToHtml(author: string, name: string) {
const markdown = await readme(author, name);
return gfm(markdown);
export async function readme(author: string, name: string) {
const { readme } = await api(`/v1/alias/${author}/${name}`);
halgendy avatar
orangeMackerel
@halgendy
// export const SAMPLE_JOKE = {
Cron
// "punchline": "A cat-tastrophe.",
// Fetches a random joke.
// function fetchRandomJoke() {
// const SAMPLE_JOKE = {
// "setup": "What do you call a group of disorganized cats?",
// Fetches a random joke.
// Fetches a random joke.
async function fetchRandomJoke() {
const response = await fetch(
"https://official-joke-api.appspot.com/random_joke",
VictorForissier avatar
tutu
@VictorForissier
An interactive, runnable TypeScript val by VictorForissier
Script
export function tutu() {
return "Hello world";
maddytansley avatar
emailRandomJoke
@maddytansley
An interactive, runnable TypeScript val by maddytansley
Script
import { email } from "https://esm.town/v/std/email?v=11";
export async function emailRandomJoke() {
async function fetchRandomJoke() {
const response = await fetch(
"https://official-joke-api.appspot.com/random_joke",
keenanzucker avatar
surfboardDemoSchedule2
@keenanzucker
@jsxImportSource https://esm.sh/react
HTTP
import { renderToString } from "npm:react-dom/server";
async function getSchedule() {
try {
hours: hours,
function Schedule({ data }) {
if (!data) return <p>Failed to fetch</p>;
</html>
export default async function(req: Request): Promise<Response> {
const scheduleData = await getSchedule();
samarsam097 avatar
siristi
@samarsam097
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
"please don't do this to me, i'm fragile",
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(
nomaan avatar
valentine
@nomaan
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
"Now tap YES"
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(
roslyn_maloney avatar
emailRandomJoke
@roslyn_maloney
// Fetches a random joke.
Cron
import { email } from "https://esm.town/v/std/email?v=9";
// Fetches a random joke.
async function fetchRandomJoke() {
const response = await fetch(
"https://official-joke-api.appspot.com/random_joke",
cescyang avatar
rule
@cescyang
An interactive, runnable TypeScript val by cescyang
Script
export function rule(response) {
const requiredApps = [
"55a54008ad1ba589aa210d2629c1df41",
barakaa avatar
miraculousYellowCaterpillar
@barakaa
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
function SocialLinks() {
const [hoveredLink, setHoveredLink] = useState(null);
</div>
function App() {
return (
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function(req: Request) {
return new Response(
visheshgupta avatar
valentine
@visheshgupta
Hello!!! Ayushi Chauhan Ji! Valentine ban jao ๐Ÿ™
HTTP
"Ab toh maan jaaaa ๐Ÿ™",
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(
easrng avatar
oldstyle
@easrng
oldstyle bring back the old @โ€‹import.syntax usage: import oldstyle from "https://esm.town/v/easrng/oldstyle"; const fn = await oldstyle` export default async () => { // import vals const fetchFns = [@std.fetch, @easrng.moduleFetch]; console.log( await Promise.all( fetchFns.map((fn) => fn("https://icanhazip.com").then((res) => res.text()), ), ), ); // get environment variables with @me.secrets console.log(@me.secrets.FORCE_COLOR); // update vals console.log(@easrng.counter++); }; // you don't have to have an export btw `; fn();
Script
) => Generator<Token | JSXToken, void, void>;
URL.revokeObjectURL(patchedModUrl);
export default async function oldstyle(...args: Parameters<typeof String.raw>) {
const gen = tokens(String.raw(...args), { jsx: true });
const identifiers = new Set<string>();
danilodiez avatar
aqi
@danilodiez
AQI Alerts Get email alerts when AQI is unhealthy near you. Set up Click Fork Change location (Line 4) to describe your location. It accepts fairly flexible English descriptions which it turns into locations via nominatim's geocoder API . Click Run Background This val uses nominatim's geocoder to get your lat, lon, and air quality data from OpenAQ. It uses EPA's NowCast AQI Index calculation and severity levels. Learn more: https://www.val.town/v/stevekrouse.easyAQI
Cron
import { email } from "https://esm.town/v/std/email?v=9";
import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI";
export async function aqi(interval: Interval) {
const location = "Atlanta";
const data = await easyAQI({ location });
โ€ฆ
207
โ€ฆ
Next