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/?q=function&page=72&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 16278 results for "function"(952ms)

Jobpostingappmain.tsx1 match

@AdeyinkaAdeosun•Updated 4 days ago
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}

ObawalLearningHUBmain.tsx3 matches

@obawal•Updated 4 days ago
20}
21
22function App() {
23 const [user, setUser] = useState<User | null>(null);
24 const [isLoading, setIsLoading] = useState(true);
169}
170
171function client() {
172 createRoot(document.getElementById("root")).render(<App />);
173}
174if (typeof document !== "undefined") { client(); }
175
176export default async function server(request: Request): Promise<Response> {
177 // Simulated server-side Google OAuth handling
178 if (request.method === "POST" && new URL(request.url).pathname === "/auth/google") {

Birthday_Wish_Wallmain.tsx1 match

@iamoluwaseuno•Updated 4 days ago
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}

Quizmain.tsx1 match

@prncyung•Updated 4 days ago
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}

NaijaHandleFindermain.tsx3 matches

@StanleyAkegbeotu•Updated 4 days ago
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5function JobBoard() {
6 const [jobs, setJobs] = useState([]);
7 const [newJob, setNewJob] = useState({
242}
243
244function client() {
245 createRoot(document.getElementById("root")).render(<JobBoard />);
246}
247if (typeof document !== "undefined") { client(); }
248
249export default async function server(request: Request): Promise<Response> {
250 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
251 const KEY = "NaijaHandleFinder";

jobpostmain.tsx1 match

@iamoluwaseuno•Updated 4 days ago
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}

Voice_Remindermain.tsx3 matches

@Scolly•Updated 4 days ago
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5function VillageReminderApp() {
6 const [recordings, setRecordings] = useState([]);
7 const [isRecording, setIsRecording] = useState(false);
225}
226
227function client() {
228 createRoot(document.getElementById("root")).render(<VillageReminderApp />);
229}
230if (typeof document !== "undefined") { client(); }
231
232export default async function server(request: Request): Promise<Response> {
233 const { blob } = await import("https://esm.town/v/std/blob");
234

Flashcard_Generatormain.tsx3 matches

@dev_me•Updated 4 days ago
11}
12
13function RevisionHelper() {
14 const [content, setContent] = useState('');
15 const [flashcards, setFlashcards] = useState<Flashcard[]>([]);
215}
216
217function client() {
218 createRoot(document.getElementById("root")).render(<RevisionHelper />);
219}
220if (typeof document !== "undefined") { client(); }
221
222export default async function server(request: Request): Promise<Response> {
223 if (request.method === 'POST' && new URL(request.url).pathname === '/generate-flashcards') {
224 const { content } = await request.json();

jobBoardWithChatAppmain.tsx9 matches

@Mrigbalode•Updated 5 days ago
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5function NameModal({ onNameSet }) {
6 const [name, setName] = useState('');
7
34}
35
36function JobPostForm({ userName, onJobPost }) {
37 const [title, setTitle] = useState('');
38 const [description, setDescription] = useState('');
100}
101
102function JobList({ jobs }) {
103 return (
104 <div style={jobListStyle}>
115}
116
117function ChatRoom({ userName }) {
118 const [message, setMessage] = useState('');
119 const [messages, setMessages] = useState([]);
146
147 useEffect(() => {
148 async function fetchMessages() {
149 try {
150 const response = await fetch('/get-messages');
188}
189
190function App() {
191 const [userName, setUserName] = useState(localStorage.getItem('userName') || '');
192 const [jobs, setJobs] = useState([]);
193
194 useEffect(() => {
195 async function fetchJobs() {
196 try {
197 const response = await fetch('/get-jobs');
232}
233
234function client() {
235 createRoot(document.getElementById("root")).render(<App />);
236}
237if (typeof document !== "undefined") { client(); }
238
239export default async function server(request: Request): Promise<Response> {
240 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
241 const KEY = "jobBoardWithChatApp";

weddingRSVPTOForevermain.tsx6 matches

@Mrigbalode•Updated 5 days ago
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5function NameModal({ onNameSet }) {
6 const [name, setName] = useState('');
7
41
42// Rest of the code remains the same as in the previous version (unchanged)
43function RSVPForm({ guestName, onSubmitRSVP }) {
44 const [availability, setAvailability] = useState('');
45 const [additionalGuests, setAdditionalGuests] = useState(0);
131}
132
133function ConfirmationMessage({ rsvpData }) {
134 return (
135 <div style={confirmationStyle}>
147}
148
149function App() {
150 const [guestName, setGuestName] = useState(localStorage.getItem('guestName') || '');
151 const [rsvpSubmitted, setRsvpSubmitted] = useState(false);
175}
176
177function client() {
178 createRoot(document.getElementById("root")).render(<App />);
179}
180if (typeof document !== "undefined") { client(); }
181
182export default async function server(request: Request): Promise<Response> {
183 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
184 const KEY = "weddingRSVPTOForever";

getFileEmail4 file matches

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

tuna8 file matches

@jxnblk•Updated 1 week 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": "*",