Search
untitled_harlequinPrimate
@sco
An interactive, runnable TypeScript val by sco
HTTP (deprecated)
export let untitled_harlequinPrimate = async (request: Request): Promise<Response> => {
return Response.json({ ok: true, text: "hello world" });
untitled_coffeeElk
@WilcoAJ
An interactive, runnable TypeScript val by WilcoAJ
Script
export const untitled_coffeeElk = (async () => {
const { parseStringPromise } = await import("npm:xml2js");
function makeUrl(date: Date): string {
const dateString = date.toISOString().split("T")[0];
return `https://repository.overheid.nl/sru?query=dt.title="exploitatievergunning horecabedrijf" AND dt.title="Besluit (Nieuw)" AND dt.title="Nieuw" AND dt.creator=Amsterdam AND dt.modified=${dateString}&maximumRecords=100`;
async function doFetch(date: Date): any {
const url = makeUrl(date);
const fetchResponse = await fetch(url.toString());
const text = await fetchResponse.text();
if (!fetchResponse.ok) {
untitled_YABHhfJ7
@ytf
An interactive, runnable TypeScript val by ytf
Script
export const untitled_YABHhfJ7 = (async () => {
untitled_blackLeech
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
Script
import { emojiByVersion } from "https://esm.town/v/jdan/emojiByVersion?v=8";
export let untitled_blackLeech = Object.keys(emojiByVersion);
untitled_copperSole
@neurott
An interactive, runnable TypeScript val by neurott
Script
import { registerDiscordSlashCommand } from "https://esm.town/v/neverstew/registerDiscordSlashCommand?v=2";
export let untitled_copperSole = registerDiscordSlashCommand(
process.env.discordAppId,
process.env.discordBotToken,
name: "ping",
description: "Say hi to your bot",
untitled_scarletFerret
@dgiulian
An interactive, runnable TypeScript val by dgiulian
Script
import { myName } from "https://esm.town/v/rodrigotello/myName?v=1";
export const untitled_scarletFerret = (async () => {
let helloFriend = "Hello, " + myName;
untitled_silverPinniped
@jacoblee93
An interactive, runnable TypeScript val by jacoblee93
Script
export const untitled_silverPinniped = (async () => {
const { ChatPromptTemplate } = await import("npm:langchain/prompts");
const { ChatOpenAI } = await import("npm:langchain/chat_models/openai");
const { StringOutputParser } = await import(
"npm:langchain/schema/output_parser"
const SYSTEM_TEMPLATE = `You are an AI programming assistant.`;
const redesignTemplate = ChatPromptTemplate.fromMessages<{
input: string;
initial_code: string;
["system", SYSTEM_TEMPLATE],
untitled_xqPioNn3
@root
An interactive, runnable TypeScript val by root
Script
import { fetch } from "https://esm.town/v/std/fetch";
export const untitled_xqPioNn3 = await fetch("https://www.baidu.com");
untitled_limeBeetle
@stevekrouse
// console.log(import.meta, getMeta());
Script
import { refs } from "https://esm.town/v/stevekrouse/refs";
function a() {
console.log(refs());
a();
// console.log(import.meta, getMeta());
untitled_blueTrout
@yokoli
An interactive, runnable TypeScript val by yokoli
Script
export const untitled_blueTrout = (async () => {
return {
data: "hello",
untitled_whiteBedbug
@cescyang_service
An interactive, runnable TypeScript val by cescyang_service
Script
import _ from "npm:lodash-es";
let numbers = _.range(10);
console.log(numbers.map(n => n * 2));
untitled_rt2wovqo
@zachnusbaum
An interactive, runnable TypeScript val by zachnusbaum
Script
export const untitled_rt2wovqo = (async () => {
function myApi(name) {
return "hi " + name;
console.email("hi");
console.email("hi");
untitled_674cf68f
@neverstew
@jsxImportSource https://esm.sh/preact
HTTP (deprecated)
/** @jsxImportSource https://esm.sh/preact */
import { htmlResponse } from "https://esm.town/v/neverstew/htmlResponse";
export async function untitled_674cf68f(request: Request): Promise<Response> {
return htmlResponse(
<main>
<h1>Test</h1>
<p>This is the body</p>
</main>,