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=fetch&page=89&format=json

For typeahead suggestions, use the /typeahead endpoint:

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

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

Found 8447 results for "fetch"(1216ms)

OpenTowniesystem_prompt.txt3 matches

@yakuzadave•Updated 1 week ago
233
234 // Inject data to avoid extra round-trips
235 const initialData = await fetchInitialData();
236 const dataScript = `<script>
237 window.__INITIAL_DATA__ = ${JSON.stringify(initialData)};
280
2815. **API Design:**
282 - `fetch` handler is the entry point for HTTP vals
283 - Run the Hono app with `export default app.fetch // This is the entry point for HTTP vals`

OpenTowniesend-message.ts3 matches

@yakuzadave•Updated 1 week ago
95 }
96
97 // If there are selected files, fetch their content and add them to the messages
98 if (selectedFiles && selectedFiles.length > 0) {
99 const vt = new ValTown({ bearerToken });
115 fileContents += `## File: ${filePath}\n\`\`\`\n${fileWithLinesNumbers(content)}\n\`\`\`\n\n`;
116 } catch (error) {
117 console.error(`Error fetching file ${filePath}:`, error);
118 fileContents += `## File: ${filePath}\nError: Could not fetch file content\n\n`;
119 }
120 }

OpenTownieProjects.tsx1 match

@yakuzadave•Updated 1 week ago
10
11async function loader({ bearerToken }: { bearerToken: string }) {
12 const data = await (await fetch("/api/projects-loader", {
13 headers: {
14 "Authorization": "Bearer " + bearerToken,

OpenTownieproject-files.ts2 matches

@yakuzadave•Updated 1 week ago
30 return c.json({ files: files.data });
31 } catch (error) {
32 console.error("Error fetching project files:", error);
33 return Response.json({ error: "Failed to fetch project files" }, { status: 500 });
34 }
35});

OpenTownieproject-branches.ts2 matches

@yakuzadave•Updated 1 week ago
21 return c.json({ branches: branches.data });
22 } catch (error) {
23 console.error("Error fetching branches:", error);
24 return Response.json({ error: "Failed to fetch branches" }, { status: 500 });
25 }
26});

OpenTownieindex.ts1 match

@yakuzadave•Updated 1 week ago
47});
48
49export default app.fetch;

OpenTownieindex.ts1 match

@yakuzadave•Updated 1 week ago
17
18// This is the entry point for HTTP vals
19export default app.fetch;

OpenTownieCreateProject.tsx1 match

@yakuzadave•Updated 1 week ago
32
33 try {
34 const response = await fetch("/api/create-project", {
35 method: "POST",
36 headers: {

OpenTownieCreateBranch.tsx1 match

@yakuzadave•Updated 1 week ago
43
44 try {
45 const response = await fetch("/api/create-branch", {
46 method: "POST",
47 headers: {

OpenTownieChat.tsx1 match

@yakuzadave•Updated 1 week ago
29 const [isDragging, setIsDragging] = useState(false);
30
31 // Use custom hook to fetch project files
32 const {
33 projectFiles,

fetchPaginatedData2 file matches

@nbbaier•Updated 2 weeks ago

FetchBasic1 file match

@fredmoon•Updated 2 weeks ago