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/$%7Bart_info.art.src%7D?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 8044 results for "fetch"(622ms)

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago

tweetFetcher2 file matches

@nbbaier•Updated 2 weeks ago

fetchAndStoreOpenAiUsage22 file matches

@nbbaier•Updated 2 weeks ago

fetchRss2 file matches

@pierremenard•Updated 2 weeks ago

fetchAndConvertToWebP1 file match

@AIWB•Updated 2 weeks ago

FetchBasic1 file match

@consitini•Updated 1 month ago

fetch_template1 file match

@gwoods22•Updated 1 month ago

fetchCongressTradeReports1 file match

@Mustakim12•Updated 2 months ago

a4595dc5b24_index.ts2 matches

@vtTestLocal•Updated 54 mins ago
135 ));
136
137// HTTP vals expect an exported "fetch handler"
138export default app.fetch;

a4595dc5b24_.cursorrules5 matches

@vtTestLocal•Updated 54 mins ago
163```
164
1655. **fetchTranspiledJavaScript** - Fetch and transpile TypeScript to JavaScript:
166```ts
167const jsCode = await fetchTranspiledJavaScript("https://esm.town/v/username/project/path/to/file.ts");
168```
169
242
243 // Inject data to avoid extra round-trips
244 const initialData = await fetchInitialData();
245 const dataScript = `<script>
246 window.__INITIAL_DATA__ = ${JSON.stringify(initialData)};
300
3015. **API Design:**
302 - `fetch` handler is the entry point for HTTP vals
303 - Run the Hono app with `export default app.fetch // This is the entry point for HTTP vals`
304 - Properly handle CORS if needed for external access