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=726&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 8301 results for "fetch"(1616ms)

searchArXiVmain.tsx2 matches

@mcgrady20150318•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const searchArXiV = async ({ query = "", start = 0, max_results = 10 }) => {
7 url.searchParams.set("start", start);
8 url.searchParams.set("max_results", max_results);
9 const response = await fetch(url.toString());
10 const text = await response.text();
11 if (!response.ok) {

simpleClimbingmain.tsx3 matches

@cjpais•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const simpleClimbing = (async () => {
59 },
60 ];
61 // const rawWeatherData = await fetch(
62 // `https://api.climbingweather.com/area/detail/738?days=1`,
63 // ).then((r) => r.json());
65 areas.map(async (
66 a,
67 ) => (await fetch(
68 `https://api.climbingweather.com/area/detail/${a.id}?days=1`,
69 ).then((r) => r.json()).then((d) => ({

amain.tsx2 matches

@hoa•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3let getEpicTvProduct = async (url) => {
4 const cheerio = await import("npm:cheerio@1.0.0-rc.12");
5 const html = await (await fetch(url)).text();
6 const $ = cheerio.load(html);
7 console.log("how it run?");

honoTanaEndpointmain.tsx1 match

@lavacxx•Updated 1 year ago
21 return c.json({ newNode });
22 });
23 return app.fetch(req);
24};

runValAPImain.tsx1 match

@stevekrouse•Updated 1 year ago
1export function runValAPI(name, ...args) {
2 return fetch(`https://api.val.town/v1/run/${name.replace("@", "")}`, {
3 method: "POST",
4 body: JSON.stringify({

tanaSavemain.tsx1 match

@nbbaier•Updated 1 year ago
23 });
24
25 return app.fetch(req);
26};

saveToTanaREADME.md1 match

@nbbaier•Updated 1 year ago
44 });
45
46 return app.fetch(req);
47};
48```

hnLatestJobsmain.tsx4 matches

@yeskunall•Updated 1 year ago
1import { email } from "https://esm.town/v/std/email?v=9";
2import { fetch } from "https://esm.town/v/std/fetch?v=4";
3import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
4import { hnJobToText } from "https://esm.town/v/yeskunall/hnJobToText?v=2";
5
29// Get upto (200) of the latest jobs posted on HN
30export async function hnLatestJobs() {
31 const jobStories: Number[] = await fetch(
32 "https://hacker-news.firebaseio.com/v0/jobstories.json",
33 ).then((res) => res.json());
35 const posts = await Promise.all(
36 jobStories.map(async (id) => {
37 return await fetchJSON(
38 `https://hacker-news.firebaseio.com/v0/item/${id}.json`,
39 );

pollNodeJSmain.tsx1 match

@stevekrouse•Updated 1 year ago
6
7export async function pollNodeJS(interval: Interval) {
8 let resp = await fetch(url);
9 if (!resp.ok) return;
10 let text = await resp.text();

unsplashFmain.tsx2 matches

@byrneml•Updated 1 year ago
1import { unsplashAccessToken } from "https://esm.town/v/byrneml/unsplashAccessToken";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3
4export let unsplashF = (token) =>
5 fetchJSON(
6 `https://api.unsplash.com/photos`,
7 {

fetchPaginatedData2 file matches

@nbbaier•Updated 2 weeks ago

FetchBasic1 file match

@fredmoon•Updated 2 weeks ago