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=5&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 18181 results for "function"(822ms)

gta6-lmaoserver.ts1 match

@hacksore•Updated 12 hours ago
1export default function server(request: Request): Response {
2 // Define the redirect targets
3 const SPECIAL_REDIRECT_TARGET =

untitled-4861main.tsx3 matches

@josephmarks•Updated 12 hours ago
32}));
33
34function FlashcardApp() {
35 const audioRef = useRef(new Audio("/audio/hungarian-alphabet.mp3"));
36 const [currentIndex, setCurrentIndex] = useState(0);
119}
120
121function client() {
122 createRoot(document.getElementById('root')).render(<FlashcardApp />);
123}
124if (typeof document !== 'undefined') client();
125
126export default async function server(request) {
127 return new Response(
128`<html>

LockerDesignerLockerDesigner.tsx6 matches

@lemu•Updated 12 hours ago
1export default async function(req: Request) {
2 return new Response(
3 renderToString(
462 let currentColorName = "Blanco Sucio";
463
464 // Update functions
465 function updateValue(slider, valueElement) {
466 valueElement.textContent = slider.value;
467 }
468
469 function updateLocker() {
470 const height = parseInt(heightSlider.value);
471 const width = parseInt(widthSlider.value);
873 });
874
875 function getColorName(hex) {
876 // This function is now replaced by the color picker logic using data-name
877 return currentColorName;
878 }

LockerDesignerslockerDesigner.html5 matches

@lemu•Updated 12 hours ago
474 let currentColorName = "Blanco Sucio";
475
476 // Update functions
477 function updateValue(slider, valueElement) {
478 valueElement.textContent = slider.value;
479 }
480
481 function updateLocker() {
482 const height = parseInt(heightSlider.value);
483 const width = parseInt(widthSlider.value);
885 });
886
887 function getColorName(hex) {
888 // This function is now replaced by the color picker logic using data-name
889 return currentColorName;
890 }

testPondiversegetCreationImage1 match

@argmn•Updated 13 hours ago
3import { TABLE_NAME } from "./updateTable";
4
5export default async function(req: Request): Promise<Response> {
6 const url = new URL(req.url);
7 const id = url.searchParams.get("id");

testPondiverseaddCreation1 match

@argmn•Updated 13 hours ago
4import { TABLE_NAME } from "./updateTable";
5
6export default async function(req: Request): Promise<Response> {
7 // body contains:
8 // - title (string)

TownieHome.tsx1 match

@valdottown•Updated 14 hours ago
4import { EyeIcon, FileCode2Icon, SparklesIcon, SquarePenIcon } from "./icons.tsx";
5
6export function Home() {
7 return (
8 <div className="container">

TownieLoginRoute.tsx1 match

@valdottown•Updated 14 hours ago
4import { useAuth } from "../hooks/useAuth.tsx";
5
6export function LoginRoute() {
7 const navigate = useNavigate();
8 const { isAuthenticated, authenticate, error } = useAuth();

testPondiverseupdateTable1 match

@argmn•Updated 15 hours ago
2
3export const TABLE_NAME = "pondiverse_creations_v4";
4export default async function(req: Request): Promise<Response> {
5 let body;
6 try {

telegramBotStartertestBot.tsx2 matches

@asdfg•Updated 15 hours ago
5import { sendTelegramMessage } from "https://esm.town/v/asdfg/telegramBotStarter/sendTelegramMessage.tsx";
6
7async function testBot() {
8 const ownerChatId = process.env.OWNER_CHAT_ID;
9
26}
27
28// console log testBot function
29console.log(await testBot);

getFileEmail4 file matches

@shouser•Updated 1 week ago
A helper function to build a file's email
tuna

tuna8 file matches

@jxnblk•Updated 2 weeks ago
Simple functional CSS library for Val Town
webup
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.
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": "*",