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/$%7Bart_info.art.src%7D?q=fetch&page=856&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 9078 results for "fetch"(2689ms)

holidaysUSmain.tsx2 matches

@rcoady•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Public holidays in the US in 2023
4export let holidaysUS = fetchJSON(
5 "https://date.nager.at/api/v2/publicholidays/2023/US"
6);

githubGistsmain.tsx2 matches

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

getCoolPostsmain.tsx2 matches

@VictorForissier•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export function getCoolPosts() {
4 return fetch("https://hn.algolia.com/api/v1/search_by_date?tags=author_pg")
5 .then((res) => res.json())
6 .then((res) => res.hits[0].comment_text);

variablePowermain.tsx2 matches

@jedahan•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const variablePower = (request, response) => {
25`;
26
27 fetchJSON("https://api.magicthegathering.io/v1/cards?power=*")
28 .then(({ cards }) => {
29 const names = new Set();

weatherDescriptionmain.tsx2 matches

@csshsh•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const weatherDescription = async (
4 params: string[]
5): Promise<unknown> => {
6 let data = await fetch(`https://wttr.in/${params["city"]}?format=j1`);
7 let jsonData = await data.json();
8 return `${params["city"]}: ${jsonData["current_condition"][0]["FeelsLikeC"]}, ${jsonData["current_condition"][0]["weatherDesc"][0]["value"]}`;

subredditExamplemain.tsx2 matches

@kisen•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Reddit recent posts from /r/aww (cute animals)
4export let subredditExample = fetchJSON(
5 "https://www.reddit.com/r/aww/.json"
6);

githubEventsmain.tsx2 matches

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

fetchermain.tsx1 match

@u•Updated 1 year ago
1export async function fetcher() {}

getOpenapiEmbeddingmain.tsx2 matches

@wilt•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3/**
9 query: string;
10}): Promise<number[]> =>
11 fetchJSON("https://api.openai.com/v1/embeddings", {
12 method: "POST",
13 headers: {

nearbyJonBomain.tsx3 matches

@jonbo•Updated 1 year ago
29 <span>aasdfasdf</span>
30
31 <button onclick="fetchTest()">test</button>
32
33   
43${
44 raw(`
45 function fetchTest() {
46 console.log("hi");
47
48 fetch("https://api.val.town/v1/run/jonbo.fetchBcycleCounts")
49 .then((response) => {
50 if (!response.ok) {

proxyFetch2 file matches

@vidar•Updated 6 hours ago

TAC_FetchBasic2 file matches

@A7_OMC•Updated 21 hours ago