Search
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](https://images.clerk.dev/oauth_github/img_2Q307RlQt0yOdXRmET9KZEbq7SV.jpeg)
myApi
@hieptuanle
An interactive, runnable TypeScript val by hieptuanle
Script
export function myApi(name) {
return "hi " + name;
![tgrecojs avatar](https://images.clerk.dev/oauth_github/img_2Ow6RTijp9JKrWCElmtQBOXhW9N.png)
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](https://images.clerk.dev/oauth_github/img_2RG4azFSOcVy1txXxxVrtz4pQXu.jpeg)
myApi
@jfix
An interactive, runnable TypeScript val by jfix
Script
export function myApi(name) {
return "hi " + name;
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();
myApi
@sudocss
An interactive, runnable TypeScript val by sudocss
Script
export function myApi(name) {
return "hi " + name;
__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](https://images.clerk.dev/oauth_github/img_2RV1tsZlRtNTWJEQcgnKhSQvpKJ.png)
myApi
@klmklm
An interactive, runnable TypeScript val by klmklm
Script
export function myApi(name) {
return "hi " + name;
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](https://images.clerk.dev/oauth_github/img_2PzMMKyAiIiylu8MvLXEiP5Oru8.jpeg)
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](https://images.clerk.dev/oauth_github/img_2RNOH4QAY8TTl1hVFDuP9RRNGpT.jpeg)
greet
@mik639
An interactive, runnable TypeScript val by mik639
Script
export function greet(name) {
return "hi " + name;
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 feasible. Instead, consider:
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 is from that. If not, put console.log at places like half way through the code to get closer to the bug.
Console logs being truncated. Check if I need everything in the log and maybe split the log into multiple parts."
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(