Search
![simorel avatar](https://images.clerk.dev/oauth_github/img_2QxekydGH08yWRf5L9ZVKncfzAj.png)
npmExample
@simorel
An interactive, runnable TypeScript val by simorel
Script
export let npmExample = (async () => {
const _ = await import("npm:lodash-es"); // The Lodash library exported as ES modules.
return _.shuffle(_.zip([1, 2, 3, 4], [5, 6, 7, 8]));
![nicola avatar](https://images.clerk.dev/oauth_github/img_2Ra16aIsm66mQWxlxfe0mnuBXra.jpeg)
npmExample
@nicola
An interactive, runnable TypeScript val by nicola
Script
export let npmExample = (async () => {
const _ = await import("npm:lodash-es"); // The Lodash library exported as ES modules.
return _.shuffle(_.zip([1, 2, 3, 4], [5, 6, 7, 8]));
npmExample
@cre8ture
An interactive, runnable TypeScript val by cre8ture
Script
export let npmExample = (async () => {
const _ = await import("npm:lodash-es"); // The Lodash library exported as ES modules.
return _.shuffle(_.zip([1, 2, 3, 4], [5, 6, 7, 8]));
![futa avatar](https://images.clerk.dev/oauth_github/img_2SC3YkLhJ9UWLjBvODpjrLCrERh.jpeg)
npmExample
@futa
An interactive, runnable TypeScript val by futa
Script
export let npmExample = (async () => {
const _ = await import("npm:lodash-es"); // The Lodash library exported as ES modules.
return _.shuffle(_.zip([1, 2, 3, 4], [5, 6, 7, 8]));
valception
@iamseeley
@jsxImportSource npm:hono@3/jsx
HTTP
/** @jsxImportSource npm:hono@3/jsx */
const app = new Hono();
app.get("/", async (c) => {
const depth = parseInt(c.req.query("depth")) || 0;
const nextDepth = depth + 1;
const spinnerGif = "https://media4.giphy.com/media/9UqRcQHzBou6A/giphy.gif?cid=6c09b952dz5ee3qoyzfg0tgxlwhpc46e29h7p432xjb7ices&ep=v1_gifs_search&rid=giphy.gif&ct=g";
return c.html(
<html lang="en">
<head>
<meta charset="UTF-8" />
npmExample
@tmcw
An interactive, runnable TypeScript val by tmcw
Script
export let npmExample = (async () => {
const { DOMParser } = await import(
"https://deno.land/x/deno_dom/deno-dom-wasm.ts"
return typeof DOMParser;
![yzx avatar](https://images.clerk.dev/oauth_github/img_2RGc8jGJGnRj1k5MqqqnUMXUw0I.jpeg)
npmExample
@yzx
An interactive, runnable TypeScript val by yzx
Script
export let npmExample = (async () => {
const _ = await import("npm:lodash-es"); // The Lodash library exported as ES modules.
return _.shuffle(_.zip([1, 2, 3, 4], [5, 6, 7, 8]));
npmExample
@U9G
An interactive, runnable TypeScript val by U9G
Script
export let npmExample = (async () => {
const _ = await import("npm:lodash-es"); // The Lodash library exported as ES modules.
return _.shuffle(_.zip([1, 2, 3, 4], [5, 6, 7, 8]));
![stevekrouse avatar](https://images.clerk.dev/uploaded/img_2PqHa2Gsy93xQrjh2w78Xu0cChW.jpeg)
npmExample
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
Script
export let npmExample = (async () => {
const _ = await import("npm:lodash-es"); // The Lodash library exported as ES modules.
return _.shuffle(_.zip([1, 2, 3, 4], [5, 6, 7, 8]));
![taowen avatar](https://images.clerk.dev/oauth_github/img_2PfI2zII2khMpCVmnoHfm1FinaG.jpeg)
npmExample
@taowen
An interactive, runnable TypeScript val by taowen
Script
export let npmExample = (async () => {
const { HUMAN_PROMPT, AI_PROMPT, Client } = await import(
"npm:@anthropic-ai/sdk"
); // The Lodash library exported as ES modules.
const client = new Client(
"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"
const prompt = `${HUMAN_PROMPT}
当你的女朋友说“滚, 不要拿AI跟我对话.”。你应该如何安慰她?
${AI_PROMPT}`;
console.log("size of prompt", prompt.length);
![vladimyr avatar](https://images.clerk.dev/oauth_github/img_2TYEBDWl6QE7Nsk4AHoXsDuwvBE.png)
unpkg
@vladimyr
An interactive, runnable TypeScript val by vladimyr
HTTP
const { author, name } = extractValInfo(import.meta.url);
const BASE_URL = `https://${author}-${name}.web.val.run`;
const app = new Hono();
app.get("/-/:params{x;[^/]+}/:filename", (c) => {
const params = Object.fromEntries(new URLSearchParams(c.req.param("params").slice(2).replace(/;/g, "&")));
try {
const redirectUrl = new TextDecoder().decode(decodeBase64Url(params.url));
return c.redirect(new URL(redirectUrl).href);
} catch {
return c.text("400 Bad Request", 400);
_
@andreterron2
An interactive, runnable TypeScript val by andreterron2
Script
export const _ = import("npm:lodash");
npmExample
@whatrocks
An interactive, runnable TypeScript val by whatrocks
Script
export let npmExample = (async () => {
// const { getSSLHubRpcClient } = await import("npm:@farcaster/hub-nodejs");
// console.log("hi: ", getSSLHubRpcClient);
// return "foo";
const _ = await import("npm:lodash-es"); // The Lodash library exported as ES modules.
console.log("_ dis ", _.shuffle);
console.log(_.shuffle(_.zip([1, 2, 34, 4], [5, 6, 7, 8])));