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/$%7Burl%7D?q=fetch&page=1023&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 13572 results for "fetch"(6573ms)

modestPurpleLousemain.tsx4 matches

@gavin_nittoli_nu•Updated 6 months ago
1import { email } from "https://esm.town/v/std/email?v=9";
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
9}
10
11const randomJoke = await fetchRandomJoke();
12const setup = randomJoke.setup;
13const punchline = randomJoke.punchline;

httpBasicAuthenticationExamplemain.tsx1 match

@kaleidawave•Updated 6 months ago
1export default async function(req: Request): Promise<Response> {
2 if (req.headers.get("Sec-Fetch-Dest") === "iframe") {
3 return new Response("Skipping auth from iframe", { status: 200 });
4 }

proficientTealFrogmain.tsx4 matches

@mcnew_mitch•Updated 6 months ago
1import { email } from "https://esm.town/v/std/email?v=9";
2
3// Fetches a random joke.
4function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
9}
10
11const randomJoke = await fetchRandomJoke();
12const setup = randomJoke.setup;
13const punchline = randomJoke.punchline;

tidyPurpleSheepmain.tsx2 matches

@mforonda•Updated 6 months ago
16// --------------------------
17
18async function fetchNews(queries: any, hours: number, lang: string, region: string) {
19 let news;
20 let results = [];
103export default async function(interval: Interval) {
104 try {
105 const results = await fetchNews(queries, hours, lang, region);
106 console.log(`${
107 results.map(q => {

gnews2emailmain.tsx2 matches

@joseforonda•Updated 6 months ago
17// --------------------------
18
19async function fetchNews(queries: any, hours: number, lang: string, region: string, maxResults: number) {
20 let news;
21 let results = [];
104export default async function(interval: Interval) {
105 try {
106 const results = await fetchNews(queries, hours, lang, region, maxResults);
107 console.log(`${
108 results.map(q => {

inspiringTomatoFleamain.tsx4 matches

@abhinavtavildar•Updated 6 months ago
1// ... imports ...
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
9}
10
11const randomJoke = await fetchRandomJoke();
12const setup = randomJoke.setup;
13const punchline = randomJoke.punchline;

efficientBronzeKoimain.tsx4 matches

@aszeto99910•Updated 6 months ago
1import { email } from "https://esm.town/v/std/email?v=9";
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
9}
10
11const randomJoke = await fetchRandomJoke();
12const setup = randomJoke.setup;
13const punchline = randomJoke.punchline;

commendableTealFerretmain.tsx1 match

@Bossbaby•Updated 6 months ago
104
105 try {
106 const response = await fetch(
107 `https://nominatim.openstreetmap.org/search?format=json&q=${encodeURIComponent(searchQuery)}&countrycodes=BD`
108 );

aiImageGeneratormain.tsx1 match

@jumptoai•Updated 6 months ago
21
22 // Use a more robust image generation endpoint
23 const response = await fetch(`https://maxm-imggenurl.web.val.run/${encodeURIComponent(prompt)}`, {
24 method: 'GET',
25 headers: {

observantApricotGoatmain.tsx4 matches

@trentonallan•Updated 6 months ago
1import { email } from "https://esm.town/v/std/email?v=9";
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
9}
10
11const randomJoke = await fetchRandomJoke();
12const setup = randomJoke.setup;
13const punchline = randomJoke.punchline;

FetchBasic2 file matches

@ther•Updated 57 mins ago

GithubPRFetcher

@andybak•Updated 3 days ago