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/$%7Bsuccess?q=fetch&page=722&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 8426 results for "fetch"(806ms)

fetchConfirmationHtmlmain.tsx2 matches

@petermillspaugh•Updated 1 year ago
1interface FetchVerificationEmailHtmlParams {
2 email: string;
3 token: string;
5}
6
7export function fetchConfirmationHtml({ email, token, reVerifying }: FetchVerificationEmailHtmlParams) {
8 const confirmationLink = `https://petemillspaugh.com/make-it-stick/email-confirmation?email=${email}&token=${token}`;
9 const html = `

fetchConfirmationHtmlREADME.md1 match

@petermillspaugh•Updated 1 year ago
1Migrated from folder: MakeItStick/Signup/fetchConfirmationHtml

untitled_crimsonFinchmain.tsx4 matches

@rob_ne•Updated 1 year 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;

untitled_violetToucanmain.tsx4 matches

@daanielzhou•Updated 1 year ago
4};
5
6// Fetches a random joke.
7async function fetchRandomJoke() {
8 const response = await fetch(
9 "https://official-joke-api.appspot.com/random_joke",
10 );
12}
13
14const randomJoke = await fetchRandomJoke();
15const setup = randomJoke.setup;
16const punchline = randomJoke.punchline;

untitled_bronzeSmeltmain.tsx4 matches

@mustafaahmedfarooqui•Updated 1 year 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;

renderGistmain.tsx2 matches

@pomdtr•Updated 1 year ago
1import { gfm } from "https://esm.town/v/pomdtr/gfm";
2import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=6";
3import { html } from "https://esm.town/v/stevekrouse/html?v=5";
4
11 });
12 }
13 const content = await fetchText(`https://gist.github.com/${owner}/${id}/raw`);
14
15 return html(await gfm(content));

getDevToPublicPostsmain.tsx1 match

@xkonti•Updated 1 year ago
1export const getDevToPublicPosts = async (username: string) => {
2 let data = await fetch(`https://dev.to/api/articles?username=${username}`);
3 return await data.json();
4};

fetchPinatsPostsmain.tsx4 matches

@stevedylandev•Updated 1 year ago
2let endDate = Math.floor(currentDate.getTime() / 1000);
3let startDate = Math.floor(currentDate.setDate(currentDate.getDate() - 7) / 1000);
4export async function fetchPinataPosts() {
5 try {
6 const soRes = await fetch(
7 `https://api.stackexchange.com/2.3/questions?fromdate=${startDate}&todate=${endDate}&order=desc&sort=creation&tagged=pinata&site=stackoverflow`,
8 {
23 });
24
25 const seRes = await fetch(
26 `https://api.stackexchange.com/2.3/questions?fromdate=${startDate}&todate=${endDate}&order=desc&sort=creation&tagged=pinata&site=ethereum`,
27 {
62 return emailText;
63 } catch (error) {
64 console.error("Error fetching data:", error);
65 return null;
66 }

honoExamplemain.tsx1 match

@tmcw•Updated 1 year ago
4app.get("/", (c) => c.text("Hello world!"));
5app.get("/yeah", (c) => c.text("Routing!"));
6export default app.fetch;

crux_addmain.tsx1 match

@yieldray•Updated 1 year ago
1export async function crux_add(name: string, content: string) {
2 const res = await fetch("https://crux.land/api/add", {
3 method: "POST",
4 headers: { "content-type": "application/json" },

fetchPaginatedData2 file matches

@nbbaier•Updated 2 weeks ago

FetchBasic1 file match

@fredmoon•Updated 2 weeks ago