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=512&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 8447 results for "fetch"(875ms)

sqliteExplorerAppmain.tsx4 matches

@cameronpak•Updated 5 months ago
1/** @jsxImportSource https://esm.sh/hono@latest/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import { iframeHandler } from "https://esm.town/v/nbbaier/iframeHandler";
5import { resetStyle } from "https://esm.town/v/nbbaier/resetStyle";
16import { verifyToken } from "https://esm.town/v/pomdtr/verifyToken";
17import { ResultSet, sqlite } from "https://esm.town/v/std/sqlite";
18import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
19import { Hono } from "npm:hono";
20import type { FC } from "npm:hono/jsx";
175});
176
177export const handler = app.fetch;
178export default iframeHandler(modifyFetchHandler(passwordAuth(handler, { verifyPassword: verifyToken })));

marvelousIvorySeahorsemain.tsx4 matches

@noah51022•Updated 5 months ago
6};
7
8// Fetches a random joke.
9async function fetchRandomJoke() {
10 const response = await fetch(
11 "https://official-joke-api.appspot.com/random_joke",
12 );
16export default async function(interval: Interval) {
17 try {
18 const randomJoke = await fetchRandomJoke();
19 console.log(randomJoke);
20 const setup = randomJoke.setup;

enchantingOliveCatfishmain.tsx4 matches

@ga8ilan•Updated 5 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;

Jokesmain.tsx4 matches

@VenusFlyTrap•Updated 5 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;

cors_proxymain.tsx2 matches

@mxis•Updated 5 months ago
52 };
53
54 // Perform the fetch request to the destination URL
55 const response = await fetch(destUrlString, init);
56
57 // Return the response from the destination URL, including CORS headers

CS1200_systemsDev_modulemain.tsx4 matches

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

MicroSaasIdeaRoulettemain.tsx1 match

@heltonteixeira•Updated 5 months ago
10 setIsSpinning(true);
11 try {
12 const response = await fetch('/generate-idea');
13 const data = await response.json();
14

agileJadeStarfishmain.tsx1 match

@karimcamara•Updated 5 months ago
2
3async function getRandomJoke() {
4 const response = await fetch(
5 "https://official-joke-api.appspot.com/random_joke",
6 );

magnificentHarlequinWhitefishmain.tsx3 matches

@joshuachann•Updated 5 months ago
1import { email } from "https://esm.town/v/std/email?v=9";
2
3// Fetches a random joke.
4function fetchRandomJoke() {
5 const SAMPLE_JOKE = {
6 "setup": "What do you call a group of disorganized cats?",
10}
11
12const randomJoke = fetchRandomJoke();
13const setup = randomJoke.setup;
14const punchline = randomJoke.punchline;

farcasterKeyHookmain.tsx1 match

@artivilla•Updated 5 months ago
59
60 // Forward the payload to Slack
61 const slackResponse = await fetch(SLACK_WEBHOOK_URL, {
62 method: "POST",
63 headers: {

fetchPaginatedData2 file matches

@nbbaier•Updated 2 weeks ago

FetchBasic1 file match

@fredmoon•Updated 2 weeks ago