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%22Image%20title%22?q=fetch&page=776&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 8361 results for "fetch"(1162ms)

runAllTestsmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export async function runAllTests({
19 results.push(
20 (
21 await fetchJSON(
22 `${api}/eval/@stevekrouse.${name}("${encodeURIComponent(api)}")`
23 )

dateMeNotifymain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchDateMeProfiles } from "https://esm.town/v/stevekrouse/fetchDateMeProfiles";
2import { notifyNew } from "https://esm.town/v/stevekrouse/notifyNew";
3
6// Requires an upstash account: https://docs.val.town/persistence-databases/upstash
7export let dateMeNotify = notifyNew({
8 getData: fetchDateMeProfiles,
9 name: "Date Me Profile",
10});

githubEventsmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3// GitHub events
4export let githubEvents = fetchJSON(
5 "https://api.github.com/users/stevekrouse/events"
6);

pingReplitmain.tsx3 matches

@paperee•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function pingReplit() {
4 fetch("https://bed.paperee.repl.co/");
5 fetch("https://school-work.paperee.repl.co/");
6}

proxyFetch7main.tsx5 matches

@alp•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const proxyFetch7 = 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};

starWarsmain.tsx2 matches

@hanssep•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Explore the Star Wars universe, from StarWarsAPI
4export let starWars = fetchJSON(
5 "https://swapi.dev/api/people/1/"
6);

valFormmain.tsx1 match

@rodrigotello•Updated 1 year ago
17 const args = Array.from(formData.values()).map(Number);
18
19 fetch('https://api.val.town/v1/run/rodrigotello.multiplicationFunctionTest', {
20 method: 'POST',
21 headers: { 'Content-Type': 'application/json' },

peelSessionArtistsmain.tsx2 matches

@aeaton•Updated 1 year ago
1import { fetchHtmlDom } from "https://esm.town/v/aeaton/fetchHtmlDom";
2
3export async function peelSessionArtists(url) {
4 const dom = await fetchHtmlDom(url);
5 const items = dom.querySelectorAll(".link-list > li > a");
6 return [...items].map((link) =>

selfmain.tsx2 matches

@eralp•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let self = async () {
4 const response = await fetch("https://api.val.town/eval/@eralp.self")
5 const json = await response.json();
6 return json.data;

getIssueNumbermain.tsx2 matches

@Timmy•Updated 1 year ago
1import { fetchJavascriptWeeklyIssues } from "https://esm.town/v/Timmy/fetchJavascriptWeeklyIssues";
2
3export const getIssueNumber = (async () => {
5 "https://deno.land/x/deno_dom@v0.1.38/deno-dom-wasm.ts"
6 );
7 const domText = await fetchJavascriptWeeklyIssues;
8 const document = new DOMParser().parseFromString(domText, "text/html");
9 const divIssues = document.querySelector(".issue");

fetchPaginatedData2 file matches

@nbbaier•Updated 2 weeks ago

FetchBasic1 file match

@fredmoon•Updated 2 weeks ago