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=741&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 8163 results for "fetch"(3401ms)

githubEventsmain.tsx2 matches

@rcoady•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);

getLocationEntitiesmain.tsx2 matches

@ryanbateman•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3
13 };
14
15 let response = await fetch(URL, {
16 method: "POST",
17 headers: {

nasaAPODmain.tsx2 matches

@takutakuma•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Returns NASA's Astronomy Picture of the Day (APOD)
4export const nasaAPOD = fetchJSON("cutt.ly/T7ksirK");
5// Forked from @iBrokeit.nasaAPOD

fetchBlobmain.tsx3 matches

@crsven•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let fetchBlob = async (url: string, options?: any = {}) => {
4 const mimeType = options.mimeType || "audio/mpeg";
5 let f = await fetch(url, {
6 ...options,
7 headers: {

githubEventsmain.tsx2 matches

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

nasaAPODmain.tsx2 matches

@boisgera•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Returns NASA's Astronomy Picture of the Day (APOD)
4export const nasaAPOD = fetchJSON("cutt.ly/T7ksirK");
5// Forked from @iBrokeit.nasaAPOD

gitHubReleaseTrackermain.tsx2 matches

@ianvph•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { set } from "https://esm.town/v/std/set?v=11";
3import { postHogAPICapture } from "https://esm.town/v/ianvph/postHogAPICapture";
10 // gets newest release from github
11 const githubProject = "https://github.com/posthog/posthog";
12 const response = await fetch(`${githubProject}/releases.atom`);
13 const newestEntry =
14 (await parseXML(await response.text())).feed

dictmain.tsx2 matches

@suhas•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let dict = async (word: string) => {
4 const req = await fetch(
5 `https://api.dictionaryapi.dev/api/v2/entries/en/${word}`
6 );

nameNationalitymain.tsx2 matches

@axel_sb•Updated 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=axel",
6);

jsonmain.tsx2 matches

@u•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function json(url: string): Promise<any> {
4 return await (await fetch(url)).json();
5}

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago