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=758&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 12644 results for "fetch"(1549ms)

solarStormAlertmain.tsx7 matches

@davincidreams•Updated 2 months ago
15 try {
16 // Using NOAA Space Weather Prediction Center's SWPC API
17 const response = await fetch('https://services.swpc.noaa.gov/json/alerts.json');
18 const alerts = await response.json();
19
48 }
49 } catch (error) {
50 console.error('Failed to fetch solar storm alerts', error);
51 }
52 }
89
90 useEffect(() => {
91 async function fetchSolarData() {
92 try {
93 // Using NOAA's Space Weather Prediction Center data endpoint
94 const response = await fetch('https://services.swpc.noaa.gov/json/solar-info.json');
95 const data = await response.json();
96
101 });
102 } catch (error) {
103 console.error('Failed to fetch solar data', error);
104 }
105 }
106
107 fetchSolarData();
108 const interval = setInterval(fetchSolarData, 60 * 60 * 1000); // Update hourly
109
110 return () => clearInterval(interval);

solarWeatherDashSunspotsmain.tsx5 matches

@davincidreams•Updated 2 months ago
12
13 useEffect(() => {
14 async function fetchSolarData() {
15 try {
16 // Using NOAA's Space Weather Prediction Center data endpoint
17 const response = await fetch('https://services.swpc.noaa.gov/json/solar-info.json');
18 const data = await response.json();
19
24 });
25 } catch (error) {
26 console.error('Failed to fetch solar data', error);
27 }
28 }
29
30 fetchSolarData();
31 const interval = setInterval(fetchSolarData, 60 * 60 * 1000); // Update hourly
32
33 return () => clearInterval(interval);

charbuildindex.js1 match

@dcm31•Updated 2 months ago
61
62// Export the handler with lastlogin authentication
63export default lastlogin(app.fetch);
64

charbuildui.js9 matches

@dcm31•Updated 2 months ago
185 // Edit note
186 try {
187 const notes = await fetchNotes();
188 const note = notes.find(n => n.id == noteId);
189
196 }
197 } catch (error) {
198 console.error('Error fetching note:', error);
199 alert('Failed to edit note. Please try again.');
200 }
214
215 // API Functions
216 async function fetchNotes() {
217 const response = await fetch('/notes/api/notes');
218 if (!response.ok) throw new Error('Failed to fetch notes');
219 return await response.json();
220 }
221
222 async function createNote(title, content) {
223 const response = await fetch('/notes/api/notes', {
224 method: 'POST',
225 headers: { 'Content-Type': 'application/json' },
232
233 async function updateNote(id, title, content) {
234 const response = await fetch(\`/notes/api/notes/\${id}\`, {
235 method: 'PUT',
236 headers: { 'Content-Type': 'application/json' },
243
244 async function deleteNote(id) {
245 const response = await fetch(\`/notes/api/notes/\${id}\`, {
246 method: 'DELETE'
247 });
253 async function loadNotes() {
254 try {
255 const notes = await fetchNotes();
256
257 if (notes.length === 0) {

audioAIChatmain.tsx1 match

@davincidreams•Updated 2 months ago
46
47 try {
48 const response = await fetch(import.meta.url, {
49 method: 'POST',
50 body: formData

avatarGeneratormain.tsx1 match

@davincidreams•Updated 2 months ago
16
17 try {
18 const response = await fetch(import.meta.url, {
19 method: 'POST',
20 body: JSON.stringify({ theme })

vtuberAppmain.tsx1 match

@davincidreams•Updated 2 months ago
16
17 try {
18 const response = await fetch(import.meta.url, {
19 method: 'POST',
20 body: JSON.stringify({ theme })

runWithDenoJsonmain.tsx3 matches

@wolf•Updated 2 months ago
4 const tempDenoJsonPath = await Deno.makeTempFile();
5
6 let denoJsonText = await fetch(denoJsonUrl).then(resp => resp.text());
7 let denoJson = JSON.parse(denoJsonText);
8
60
61 try {
62 const response = await fetch(githubScriptUrl);
63 const scriptContent = await response.text();
64
76 } catch (error) {
77 if (error instanceof Error) {
78 return new Response(`// Error fetching script\nconsole.error(${JSON.stringify(error.message)})`, {
79 status: 500,
80 headers: { "Content-Type": "application/javascript" },

Image_Generationmain.tsx1 match

@davincidreams•Updated 2 months ago
14
15 try {
16 const response = await fetch("/generate", {
17 method: "POST",
18 body: JSON.stringify({ prompt }),

searchArXiVmain.tsx1 match

@davincidreams•Updated 2 months ago
5 url.searchParams.set("start", String(start));
6 url.searchParams.set("max_results", String(max_results));
7 const response = await fetch(url);
8 const text = await response.text();
9 if (!response.ok) {

fetch-socials4 file matches

@welson•Updated 1 day ago
fetch and archive my social posts

fetchRssForSubcurrent2 file matches

@ashryanio•Updated 2 days ago