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/$1?q=fetch&page=49&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 13579 results for "fetch"(2767ms)

hono-utilsmod.ts1 match

@matt_hallway•Updated 4 days ago
9 const getContent = async (url: string) => {
10 try {
11 const resp = await fetch(url)
12 if (!resp.ok) {
13 return null

paperang_printerindex.ts1 match

@dcm31•Updated 4 days ago
353});
354
355export default app.fetch;

paperang_printerutils.js2 matches

@dcm31•Updated 4 days ago
20 paperangProtocol.log(`Saving MAC address: ${macAddress}`, 'info');
21
22 const response = await fetch('/api/save-mac', {
23 method: 'POST',
24 headers: { 'Content-Type': 'application/json' },
45 paperangProtocol.log('Loading saved MAC address...', 'debug');
46
47 const response = await fetch('/api/get-mac');
48 const result = await response.json();
49

ctan-mirrormain.ts1 match

@aeaton•Updated 4 days ago
7 }
8
9 const result = await fetch(`https://mirrors.ctan.org/${path}`);
10 if (!result.ok) {
11 return new Response(result.statusText, { status: result.status });

bluetoothscannerindex.ts1 match

@dcm31•Updated 4 days ago
20});
21
22export default app.fetch;

HTTP_exampleshonoExample1 match

@eddloschi•Updated 4 days ago
4app.get("/", (c) => c.text("Hello from Hono!"));
5app.get("/yeah", (c) => c.text("Routing!"));
6export default app.fetch;

HTTP_examplesfetsExample1 match

@eddloschi•Updated 4 days ago
21});
22
23export default router.fetch;

socialDataSearchmain.tsx2 matches

@stevekrouse•Updated 4 days ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export async function socialDataSearch(query: string): Promise<SocialDataResponse> {
4 const url = new URL("https://stevekrouse-socialdataproxy.web.val.run/twitter/search");
5 url.searchParams.set("query", query);
6 return await fetchJSON(url.toString(), {
7 bearer: Deno.env.get("valtown"),
8 });

MiniAppStarterApp.tsx5 matches

@moe•Updated 4 days ago
9import { Button, Section } from "./components/ui.tsx";
10import { CustomHaptics } from "./screens/CustomHaptics.tsx";
11import { fetchNeynarGet } from "./util/neynar.ts";
12
13export function App() {
70
71function Database() {
72 const queryFn = () => fetch("/api/counter/get").then((r) => r.json());
73 const { data, refetch } = useQuery({ queryKey: ["counter"], queryFn });
74 return (
75 <Section className="flex flex-col items-start gap-3 m-5">
76 {/* <h2 className="font-semibold">Database Example</h2> */}
77 <div className="">Counter value: {data}</div>
78 <Button variant="outline" onClick={() => fetch("/api/counter/increment").then(refetch)}>
79 Increment
80 </Button>
85function Neynar() {
86 useEffect(() => {
87 fetchNeynarGet("user/by_username?username=moe").then(console.log).catch(console.error);
88 }, []);
89

realtymain.tsx2 matches

@legal•Updated 4 days ago
667 // This now directly calls the main analysis endpoint (which uses the new prompt)
668 try {
669 const response = await fetch(window.location.pathname + '?format=json&action=loanAssumptionInfo', { method: 'POST', body: formData });
670 const responseData = await response.json();
671
954export default async function(req: Request) {
955 const { OpenAI } = await import("https://esm.town/v/std/openai");
956 const { fetch } = await import("https://esm.town/v/std/fetch");
957 // PDFExtract is kept if you want to add document features later, but not primary for this use case.
958 const { PDFExtract, PDFExtractOptions } = await import("npm:pdf.js-extract");

FetchBasic2 file matches

@ther•Updated 7 hours ago

GithubPRFetcher

@andybak•Updated 3 days ago