Search

Results include substring matches and semantically similar vals. Learn more
alfongj avatar
crossmintSolanaTxGenerator
@alfongj
@jsxImportSource https://esm.sh/react
HTTP
import { vscDarkPlus } from "https://esm.sh/react-syntax-highlighter/dist/esm/styles/prism";
function App() {
const [input, setInput] = useState("");
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
client();
export default async function server(request: Request): Promise<Response> {
const { OpenAI } = await import("https://esm.town/v/std/openai");
const openai = new OpenAI();
const url = new URL(request.url);
try {
const completion = await openai.chat.completions.create({
model: "gpt-4o",
hieptuanle avatar
myApi
@hieptuanle
An interactive, runnable TypeScript val by hieptuanle
Script
export function myApi(name) {
return "hi " + name;
tgrecojs avatar
gistFetcher
@tgrecojs
An interactive, runnable TypeScript val by tgrecojs
Script
.catch(error => {
return { error: "Error processing data: " + error.message };
function transformData(data) {
// Implement your data transformation logic here
return getFileContents("accounts.json")(data); // Modify as needed
jfix avatar
myApi
@jfix
An interactive, runnable TypeScript val by jfix
Script
export function myApi(name) {
return "hi " + name;
iamseeley avatar
valTownDataLogs
@iamseeley
An interactive, runnable TypeScript val by iamseeley
Script
import { valTownUser } from "https://esm.town/v/iamseeley/valTownUser";
async function logUserData() {
try {
const username = await valTownUser.getUsername();
sudocss avatar
myApi
@sudocss
An interactive, runnable TypeScript val by sudocss
Script
export function myApi(name) {
return "hi " + name;
lbb00 avatar
__htmlTesting
@lbb00
An interactive, runnable TypeScript val by lbb00
Cron
const TitleTextDefault = ":)";
const Title = (text) => html`<h1>${text || TitleTextDefault}</h1>`;
export function __htmlTesting() {
assertEquals(html`${undefined}`, "undefined");
assertEquals(html`${{ a: 1 }}`, `{"a":1}`);
klmklm avatar
myApi
@klmklm
An interactive, runnable TypeScript val by klmklm
Script
export function myApi(name) {
return "hi " + name;
janpaul123 avatar
valle_tmp_7814561962855233872642258373586
@janpaul123
// This val will respond with "Hello world" to all incoming HTTP requests.
HTTP
// This val will respond with "Hello world" to all incoming HTTP requests.
export default async function main(req: Request): Promise<Response> {
return new Response("Hello world");
cjpais avatar
glifJson
@cjpais
// Forked from @jamiedubs.glifJson
Script
export const glifJson = async (id: string) => {
const getRandom = (list) => {
const shuffledList = list.sort(function () {
return 0.5 - Math.random();
const numToPick = Math.min(20, shuffledList.length);
mik639 avatar
greet
@mik639
An interactive, runnable TypeScript val by mik639
Script
export function greet(name) {
return "hi " + name;
willthereader avatar
Debugging_Guide
@willthereader
@jsxImportSource https://esm.sh/hono@latest/jsx
HTTP
<h3>Narrow the search space</h3>
<p>""How can I narrow down to the code that could cause this problem?" Tracing through the whole program is not f
Using your intuition as a starting point. Did you change a function recently? Are there any likely culprits?
Put console.log at significant point of the program so I can see what’s happening. Ideally, I can spot the problematic code i
Console logs being truncated. Check if I need everything in the log and maybe split the log into multiple parts."
all avatar
excaliEmbed
@all
@jsxImportSource https://esm.sh/react
HTTP
import { createRoot } from "https://esm.sh/react-dom/client";
function App() {
return (
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
client();
export default async function server(request: Request): Promise<Response> {
return new Response(
dhvanil avatar
val_7lBwh14Ivc
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export default async function handler(req) {
try {
const result = await (async () => {
function fibonacci() {
let a = 0, b = 1;
while (b < 1000) {
zeitport avatar
myApi
@zeitport
An interactive, runnable TypeScript val by zeitport
Script
export function myApi(name) {
return "hi " + name;