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=1&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 2373 results for "fetch"(400ms)

pondiversefetchCreations0 matches

@iliazeus•Updated 1 hour ago
1import { blob } from "https://esm.town/v/std/blob";
2import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
3import { TABLE_NAME } from "./updateTable";
4
5export default async function(req: Request): Promise<Response> {

JimeluStevenssendDailyBrief.ts1 match

@luke_f•Updated 2 hours ago
129 const lastSunday = today.startOf("week").minus({ days: 1 });
130
131 // Fetch relevant memories using the utility function
132 const memories = await getRelevantMemories();
133

CTGBreakerindex.tsx2 matches

@horsefacts•Updated 4 hours ago
63});
64
65// HTTP vals expect an exported "fetch handler"
66// This is how you "run the server" in Val Town with Hono
67export default app.fetch;

CTGBreakerimage.tsx2 matches

@horsefacts•Updated 5 hours ago
66 const fontPromises = fontsConfig.map(async (font) => {
67 const fontUrl = "https://cdn.jsdelivr.net/npm/@tamagui/font-inter@1.108.3/otf/" + font.fontFile;
68 const fontArrayBuf = await fetch(fontUrl).then((res) => res.arrayBuffer());
69 return { name: font.name, data: fontArrayBuf, weight: font.weight };
70 });
77 // const api = `https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/svg/${code.toLowerCase()}.svg`
78 const api = `https://cdn.jsdelivr.net/gh/shuding/fluentui-emoji-unicode/assets/${code.toLowerCase()}_color.svg`;
79 return fetch(api).then((r) => r.text());
80};
81

CTGBreakerneynar.ts14 matches

@horsefacts•Updated 5 hours ago
1const baseUrl = "https://api.neynar.com/v2/farcaster/";
2
3export async function fetchNeynarGet(path: string) {
4 const res = await fetch(baseUrl + path, {
5 method: "GET",
6 headers: {
14}
15
16export function fetchUser(username: string) {
17 return fetchNeynarGet(`user/by_username?username=${username}`).then(r => r.user);
18}
19export function fetchUsersById(fids: string) {
20 return fetchNeynarGet(`user/bulk?fids=${fids}`).then(r => r.users);
21}
22
23export function fetchUserFeed(fid: number) {
24 return fetchNeynarGet(
25 `feed?feed_type=filter&filter_type=fids&fids=${fid}&with_recasts=false&with_replies=false&limit=100&cursor=`,
26 ).then(r => r.casts);
27}
28
29export function fetchChannel(channelId: string) {
30 return fetchNeynarGet(`channel?id=${channelId}`).then(r => r.channel);
31}
32
33export function fetchChannelFeed(channelId: string) {
34 return fetchNeynarGet(
35 `feed/channels?channel_ids=${channelId}&with_recasts=false&limit=100`,
36 ).then(r => r.casts);
37}
38
39export function fetchChannelsFeed(channelIds: array) {
40 return fetchNeynarGet(
41 `feed/channels?channel_ids=${channelIds.join(",")}&with_recasts=false&limit=100`,
42 ).then(r => r.casts);

CTGBreakerHome.tsx1 match

@horsefacts•Updated 5 hours ago
7
8import { Button, Input, Section } from "../components/ui.tsx";
9import { fetchUsersById } from "../util/neynar.ts";
10
11export function Home() {

CTGBreakerfarcaster-notifications.ts1 match

@horsefacts•Updated 5 hours ago
41
42async function sendNotification(notificationDetails: any, payload: any) {
43 return await fetch(notificationDetails.url, {
44 method: "POST",
45 headers: { "Content-Type": "application/json" },

reactHonoStarterindex.ts2 matches

@Nabinduthraj•Updated 10 hours ago
21});
22
23// HTTP vals expect an exported "fetch handler"
24// This is how you "run the server" in Val Town with Hono
25export default app.fetch;
172const app = new Hono();
173app.get("/", AreYouSolvingtheRightProblems);
174export default app.fetch;
175
176{

stevensDemosendDailyBrief.ts1 match

@brenwildt42•Updated 15 hours ago
135 const lastSunday = today.startOf("week").minus({ days: 1 });
136
137 // Fetch relevant memories using the utility function
138 const memories = await getRelevantMemories();
139

fetchPaginatedData2 file matches

@nbbaier•Updated 3 days ago

tweetFetcher2 file matches

@nbbaier•Updated 6 days ago