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=218&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 2445 results for "fetch"(813ms)

devstatsmain.tsx3 matches

@tmcw•Updated 1 month ago
130 return c.json(await getRows());
131 } catch (error) {
132 console.error("Error fetching data:", error);
133 return c.text("Error fetching data", 500);
134 }
135});
170 `);
171
172 return app.fetch(req);
173}

social_dataindex.ts1 match

@fiberplane•Updated 1 month ago
93});
94
95export default app.fetch;

social_dataindex.ts1 match

@fiberplane•Updated 1 month ago
21 const url = new URL(`${this.baseURL}/twitter/search`);
22 url.searchParams.set("query", query);
23 const resp = await fetch(url, {
24 headers: {
25 Authorization: `Bearer ${this.bearerToken}`,

cerebras_coderindex1 match

@Guru1996•Updated 1 month ago
5async function servePublicFile(path: string): Promise<Response> {
6 const url = new URL("./public/" + path, import.meta.url);
7 const text = await (await fetch(url, {
8 headers: {
9 "User-Agent": "", // to transpile TS to JS

cerebras_coderindex1 match

@Guru1996•Updated 1 month ago
181
182 try {
183 const response = await fetch("/", {
184 method: "POST",
185 body: JSON.stringify({

digestupdateNews7 matches

@strysg•Updated 1 month ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { parseXML } from "https://esm.town/v/stevekrouse/parseXML";
3let { parse } = await import("npm:node-html-parser");
11 oldItems ??= {};
12
13 // Fetch each source, filter unseen news items
14 for (const source of sources) {
15 const sourceItems = await fetchSource(source, oldItems, descMaxLength);
16 newItems = { ...newItems, ...sourceItems };
17 }
26}
27
28async function fetchSource(url: string, oldItems: any, descMaxLength: number) {
29 // Fetch a source, filter unseen news items
30 console.log(`fetch: ${url}`);
31
32 function parseDescription(description: string, maxlength: number) {
52 try {
53 const oldLinks = new Set(Object.keys(oldItems));
54 const response = await fetch(url, { signal: AbortSignal.timeout(5000) });
55 const responseJSON = await parseXML(await response.text());
56 const items = responseJSON.rss.channel.item.filter(

social_dataindex.ts1 match

@charmaine•Updated 1 month ago
21 const url = new URL(`${this.baseURL}/twitter/search`);
22 url.searchParams.set("query", query);
23 const resp = await fetch(url, {
24 headers: {
25 Authorization: `Bearer ${this.bearerToken}`,

social_dataindex.ts1 match

@charmaine•Updated 1 month ago
101});
102
103export default app.fetch;

social_dataindex.ts1 match

@stevekrouse•Updated 1 month ago
21 const url = new URL(`${this.baseURL}/twitter/search`);
22 url.searchParams.set("query", query);
23 const resp = await fetch(url, {
24 headers: {
25 Authorization: `Bearer ${this.bearerToken}`,

cerebras_coderindex1 match

@jazib•Updated 1 month ago
5async function servePublicFile(path: string): Promise<Response> {
6 const url = new URL("./public/" + path, import.meta.url);
7 const text = await (await fetch(url, {
8 headers: {
9 "User-Agent": "", // to transpile TS to JS

fetchPaginatedData2 file matches

@nbbaier•Updated 5 days ago

tweetFetcher2 file matches

@nbbaier•Updated 1 week ago