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%20%22Optional%20title%22?q=fetch&page=944&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 10142 results for "fetch"(941ms)

untitled_blackCrayfishmain.tsx2 matches

@stevekrouseUpdated 1 year ago
1import { fetchXML } from "https://esm.town/v/stevekrouse/fetchXML";
2
3export let untitled_blackCrayfish = fetchXML(
4 "https://www.readtangle.com/archive/rss/",
5);
1import { discordSendDM } from "https://esm.town/v/vtdocs/discordSendDM?v=6";
2import process from "node:process";
3import { discordFetch } from "https://esm.town/v/vtdocs/discordFetch?v=10";
4import { randomize } from "https://esm.town/v/stevekrouse/randomize";
5import { discordDMs } from "https://esm.town/v/stevekrouse/discordDMs";
15 )
16 ) {
17 const messages = await discordFetch(
18 process.env.discordBot,
19 // Note: not using pagination here

untitled_ivoryFleamain.tsx2 matches

@stevekrouseUpdated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let untitled_ivoryFlea = () => fetch("https://emojicdn.elk.sh/❤️");

limitmain.tsx2 matches

@stevekrouseUpdated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2import process from "node:process";
3import { parentReference } from "https://esm.town/v/stevekrouse/parentReference";
45 : process.env.rlimitNamespacePassword;
46 //
47 const limit = await fetchJSON(
48 `https://api.rlimit.com/limit/${namespaceId}/${type}/${max}/${interval}/${key}?cost=${cost}&subNamespace=${subNamespace}&password=${pass}`,
49 );

getPublicValsmain.tsx3 matches

@stevekrouseUpdated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export const getPublicVals = async (username) => {
4 let { id } = await fetchJSON(
5 `https://api.val.town/v1/alias/${username}`,
6 );
7 return fetchJSON(
8 `https://api.val.town/v1/users/${id}/vals`,
9 );

testMutateSemantics2main.tsx4 matches

@stevekrouseUpdated 1 year ago
1import { TEST_API } from "https://esm.town/v/stevekrouse/TEST_API";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export async function testMutateSemantics2({
15 authenticated: boolean;
16}) {
17 const { data: last } = await fetchJSON(
18 `${TEST_API}/eval/${stateName}`
19 );
20 const now = Date.now();
21 await fetchJSON(
22 `${TEST_API}/eval/${mutator(now)}`
23 );
24 const { data: next } = await fetchJSON(
25 `${TEST_API}/eval/${stateName}`
26 );

fetchGiphymain.tsx3 matches

@simply_say_mUpdated 1 year ago
1import process from "node:process";
2
3export const fetchGiphy = (async (searchTerm) => {
4 const { GiphyFetch } = await import("npm:@giphy/js-fetch-api");
5 const gf = new GiphyFetch(process.env.giphyApiKey);
6 const { data: gifs } = await gf.search(searchTerm, { limit: 10 });
7 return gifs;

proxyFetch10main.tsx5 matches

@alpUpdated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const proxyFetch10 = async (req, res) => {
4 const { url, options } = req.body;
5 try {
6 const response = await fetch(url, options);
7 return res.status(response.status).send(await response.text());
8 } catch (e) {
9 const errorMessage = e instanceof Error ? e.message : "Unknown error";
10 console.error("Failed to initiate fetch", e);
11 return res.status(500).send(`Failed to initiate fetch: ${errorMessage}`);
12 }
13};

nameNationalitymain.tsx2 matches

@feepUpdated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Predict the nationality of a name
4export let nameNationality = fetchJSON(
5 "https://api.nationalize.io/?name=michael"
6);

pingReplitmain.tsx2 matches

@dr0Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function pingReplit() {
4 fetch("https://lookup.icxk.top/imgs/36x36.png");
5}

agentplex-deal-flow-email-fetch1 file match

@anandvcUpdated 3 days ago

proxyFetch2 file matches

@vidarUpdated 5 days ago