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=254&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 2746 results for "fetch"(402ms)

alluringAmethystMonkeymain.tsx2 matches

@charmaine•Updated 3 months ago
42
43 try {
44 const response = await fetch(`https://www.shovel.report/api/domains/${domain}`);
45 if (!response.ok) {
46 throw new Error(`HTTP error! status: ${response.status}`);
52 };
53 } catch (error) {
54 console.error("Error fetching technologies:", error);
55 return { services: [], social_media: {} };
56 }

hnhiringStatsmain.tsx5 matches

@maxm•Updated 3 months ago
1import cheerio from "https://esm.sh/cheerio@1.0.0-rc.12";
2
3async function fetchJobCount(url: string): Promise<{ count: number; month: string; year: string } | null> {
4 try {
5 const response = await fetch(url);
6 if (!response.ok) {
7 console.error(`Failed to fetch ${url}: ${response.status} ${response.statusText}`);
8 return null;
9 }
20 return { count, month, year };
21 } catch (error) {
22 console.error(`Error fetching ${url}:`, error);
23 return null;
24 }
55
56 for (const url of urls) {
57 const result = await fetchJobCount(url);
58 if (result) {
59 console.log(`${result.count} jobs, ${result.month} ${result.year}`);

anon_docmain.tsx6 matches

@stevekrouse•Updated 3 months ago
51 const id = path.split("/")[2];
52 if (id && id !== "undefined") {
53 fetchDocument(id);
54 setMode(path.startsWith("/view/") ? "view" : "edit");
55 } else {
59 }, []);
60
61 const fetchDocument = async (id) => {
62 try {
63 const response = await fetch(`/api/document/${id}`);
64 if (!response.ok) {
65 throw new Error(`HTTP error! status: ${response.status}`);
70 setForkId(data.id);
71 } catch (e) {
72 console.error("Error fetching document:", e);
73 setError("Error fetching document. Please try again.");
74 }
75 };
78 e.preventDefault();
79 try {
80 const response = await fetch("/api/document", {
81 method: "POST",
82 headers: { "Content-Type": "application/json" },

notion2wallabagmain.tsx2 matches

@stevekrouse•Updated 3 months ago
80
81async function getWallabagToken(config: any) {
82 const response = await fetch(`${config.WALLABAG_URL}/oauth/v2/token`, {
83 method: "POST",
84 headers: {
99
100async function saveToWallabag(url: string, token: string, config: any) {
101 const response = await fetch(`${config.WALLABAG_URL}/api/entries.json`, {
102 method: "POST",
103 headers: {

cerebras_codermain.tsx1 match

@charmaine•Updated 4 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

vscodemain.tsx1 match

@pomdtr•Updated 4 months ago
9});
10
11export default lastlogin(vscode.fetch, { verifyEmail });

hardworkingLimeCheetahmain.tsx1 match

@stevekrouse•Updated 4 months ago
186
187 try {
188 const response = await fetch("/", {
189 method: "POST",
190 body: JSON.stringify({

inspiringLavenderTakinmain.tsx4 matches

@stevekrouse•Updated 4 months ago
36
37 useEffect(() => {
38 async function fetchStats() {
39 const response = await fetch("/dashboard-stats");
40 const data = await response.json();
41 setStats(data);
42 }
43 fetchStats();
44 }, []);
45
146
147 try {
148 const response = await fetch("/", {
149 method: "POST",
150 body: JSON.stringify({

wideApimain.tsx1 match

@maxm•Updated 4 months ago
88export type WideApi = typeof routes;
89
90export default app.fetch.bind(app);

productiveRosePeacockmain.tsx4 matches

@stevekrouse•Updated 4 months ago
36
37 useEffect(() => {
38 async function fetchStats() {
39 const response = await fetch("/dashboard-stats");
40 const data = await response.json();
41 setStats(data);
42 }
43 fetchStats();
44 }, []);
45
146
147 try {
148 const response = await fetch("/", {
149 method: "POST",
150 body: JSON.stringify({

fetchPaginatedData2 file matches

@nbbaier•Updated 6 days ago

tweetFetcher2 file matches

@nbbaier•Updated 1 week ago