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/image-url.jpg?q=fetch&page=744&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 13191 results for "fetch"(1349ms)

blogindex.ts2 matches

@shouser•Updated 1 month ago
23});
24
25// Export the fetch handler for Val Town
26export default app.fetch;

vt_blogvt-blog.md5 matches

@shouser•Updated 1 month ago
38- Tailwind CSS for styling
39- Unified/Remark/Rehype for markdown processing
40- RSS Parser for fetching posts from the old blog
41
42#### Rendering old posts
46```ts
47const OLD_BLOG_URL = "https://val-town-blog.pages.dev/";
48const response = await fetch(
49 new Request(OLD_BLOG_URL + url.pathname + url.search, {
50 method: request.method,
54```
55
56#### Fetching old posts
57
58We fetch old posts via the `https://val-town-blog.pages.dev/rss.xml`,
59and combine them with the locally-hosted posts. We cache them both in-memory
60on server startup.
61
62```ts
63// Example of how we fetch blog posts
64async function getAllBlogPosts() {
65 // Get local posts from markdown files

vt_blogREADME.md2 matches

@shouser•Updated 1 month ago
24 - **`HomePage.tsx`**: Renders the blog homepage with the list of posts
25 - **`BlogPost.tsx`**: Renders individual blog posts
26- **`/utils/blogPosts.ts`**: Utilities for fetching, parsing, and caching blog posts
27- **`/blog-posts/`**: Directory containing markdown files for blog posts
28
32- **Tailwind CSS**: For styling (via CDN)
33- **Unified/Remark/Rehype**: For markdown processing with GitHub Flavored Markdown support
34- **RSS Parser**: For fetching posts from the old blog's RSS feed
35- **Gray Matter**: For parsing YAML frontmatter
36

vt_blogproxy.ts1 match

@shouser•Updated 1 month ago
9
10 // Proxy the request to the old blog
11 const response = await fetch(
12 new Request(OLD_BLOG_URL + url.pathname + url.search, {
13 method: c.req.method,

vt_blogindex.ts2 matches

@shouser•Updated 1 month ago
19});
20
21// Export the fetch handler for Val Town
22export default app.fetch;

projectNameGeneratormain.tsx1 match

@matthamlin•Updated 1 month ago
11async function getDefintion(word: string) {
12 try {
13 let definition = await fetch(`https://api.dictionaryapi.dev/api/v2/entries/en/${word}`).then(r => r.json());
14
15 return definition[0].meanings[0].definitions[0].definition;

reactHonoStarterindex.ts2 matches

@std•Updated 1 month 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;

reactHonoStarterindex.ts2 matches

@Weidows•Updated 1 month 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;

newCerebrasModelAlertmain.tsx2 matches

@Ashraff•Updated 1 month ago
1import { blob } from "https://esm.town/v/std/blob?v=13";
2import { email } from "https://esm.town/v/std/email?v=13";
3import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
4
5export default async function(interval: Interval) {
7 const historicalModels = await blob.getJSON("cerebras-models.json");
8
9 const currentModels = await fetchJSON("https://api.cerebras.ai/v1/models", {
10 bearer: Deno.env.get("CEREBRAS_API_KEY"),
11 });

cerebras_coderindex1 match

@Ashraff•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

proxiedfetch1 file match

@jayden•Updated 18 hours ago

fetch-socials4 file matches

@welson•Updated 4 days ago
fetch and archive my social posts