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=737&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 8210 results for "fetch"(2398ms)

fetchGHRepoInfomain.tsx3 matches

@noartem•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function fetchGHRepoInfo(userName, repoName) {
4 const response = await fetch(`https://ungh.cc/repos/${userName}/${repoName}`);
5 return await response.json();
6}

GenerateQRmain.tsx1 match

@ramkarthik•Updated 1 year ago
1// fetch("https://api.val.town/v1/express/ramkarthik.GenerateQR?url={url}"
2export async function GenerateQR(req, res) {
3 const url = req.query.url;

weathermain.tsx2 matches

@marcel•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const weather = async (city: string): Promise<unknown> => {
4 let data = await fetch(`https://wttr.in/${city}?format=j1`);
5 return data.json();
6};

githubStarredmain.tsx2 matches

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

githubStarredmain.tsx2 matches

@potherca•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// GitHub starred repos
4export let githubStarred = fetchJSON("https://api.github.com/users/potherca/starred")
5 .then((repos) => repos.map((repo) => repo.html_url));

testcase1main.tsx2 matches

@charles2•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export let testcase1 = fetchJSON('https://api.val.town/eval/@stevekrouse.example1')
4

buildReactDomMinifiedmain.tsx2 matches

@liamdanielduffy•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { REACT_DOM_MINIFIED } from "https://esm.town/v/liamdanielduffy/REACT_DOM_MINIFIED";
3let { REACT_DOM_MINIFIED_PT4 } = await import("https://esm.town/v/liamdanielduffy/REACT_DOM_MINIFIED_PT4");
7
8export async function buildReactDomMinified() {
9 const res = await fetch(
10 "https://unpkg.com/react-dom@18.2.0/umd/react-dom.production.min.js",
11 );

buildReactMinifiedmain.tsx2 matches

@liamdanielduffy•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3let { REACT_MINIFIED } = await import("https://esm.town/v/liamdanielduffy/REACT_MINIFIED");
4
5export async function buildReactMinified() {
6 let res = await fetch(
7 "https://unpkg.com/react@18/umd/react.production.min.js",
8 );

githubGistsmain.tsx2 matches

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

githubFollowersmain.tsx2 matches

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

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago