Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/image-url.jpg%20%22Image%20title%22?q=function&page=2045&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=function

Returns an array of strings in format "username" or "username/projectName"

Found 30888 results for "function"(2644ms)

react-starter

react-starterApp.tsx1 match

@jxnblk•Updated 2 months ago
2import { useState } from "https://esm.sh/react@19";
3
4export default function App () {
5 const [count, setCount] = useState(0);
6
react-starter

react-starterhttp.tsx1 match

@jxnblk•Updated 2 months ago
6const CLIENT_MODULE = import.meta.url.replace("http.tsx", "client.tsx");
7
8export default async function (req: Request): Promise<Response> {
9 const app = renderToString(<App />);
10 const html = `<!DOCTYPE html>
react-streaming-starter

react-streaming-starterhttp.tsx1 match

@jxnblk•Updated 2 months ago
5const CLIENT_MODULE = import.meta.url.replace("http.tsx", "client.tsx");
6
7export default async function (req: Request): Promise<Response> {
8 const stream = await renderToReadableStream(<App />, {
9 bootstrapModules: [CLIENT_MODULE],
react-streaming-starter

react-streaming-starterApp.tsx1 match

@jxnblk•Updated 2 months ago
2import { useState } from "https://esm.sh/react@19";
3
4export default function App () {
5 const [count, setCount] = useState(0);
6
dotcom

dotcomproxies.tsx1 match

@jxnblk•Updated 2 months ago
14
15
16export default async function proxyMiddleware(req: DataRequest, res: Response, next) {
17 const match = paths.find(p => p.match(req.data.pathname));
18 if (match) {
dotcom

dotcomredirects.tsx1 match

@jxnblk•Updated 2 months ago
65];
66
67export default async function redirectMiddleware(req: DataRequest, res: Response, next): Promise<Response> {
68 const match = paths.find(p => p.match(req.data.pathname));
69 // const match = paths.find(p => p.regex.match(req.data.pathname));

fluentAmaranthChameleonmain.tsx3 matches

@Nwauto•Updated 2 months ago
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5function App() {
6 const [messages, setMessages] = useState([]);
7 const [newMessage, setNewMessage] = useState('');
79}
80
81function client() {
82 createRoot(document.getElementById("root")).render(<App />);
83}
84if (typeof document !== "undefined") { client(); }
85
86export default async function server(request: Request): Promise<Response> {
87 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
88 const KEY = "fluentAmaranthChameleon";

skullcathttp.tsx1 match

@jxnblk•Updated 2 months ago
20// <style>body{margin:0;background-color:black;color:white;font-family:system-ui,sans-serif}</style>
21
22export default async function (req: Request): Promise<Response> {
23 return new Response(html, {
24 headers: {

react-hono-with-react-routerApp.tsx1 match

@stevekrouse•Updated 2 months ago
2import { useState } from "https://esm.sh/react@18.2.0";
3
4export function App() {
5 const [clicked, setClicked] = useState(0);
6 return (

inspiringEmeraldMarsupialREADME.md1 match

@dcm31•Updated 2 months ago
17import { HandDrawnCardsLogo } from './handDrawnCardsLogo.js';
18
19function App() {
20 return <HandDrawnCardsLogo />;
21}
tuna

tuna9 file matches

@jxnblk•Updated 1 week ago
Simple functional CSS library for Val Town

getFileEmail4 file matches

@shouser•Updated 1 month ago
A helper function to build a file's email
lost1991
import { OpenAI } from "https://esm.town/v/std/openai"; export default async function(req: Request): Promise<Response> { if (req.method === "OPTIONS") { return new Response(null, { headers: { "Access-Control-Allow-Origin": "*",
webup
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.