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=769&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 8066 results for "fetch"(1381ms)

nameNationalitymain.tsx2 matches

@hetzelhouse•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=staci"
6);

fetchTwitterUsermain.tsx3 matches

@andreterron•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export async function fetchTwitterUser({ id, accessToken, query = "" }: {
4 id: string;
5 accessToken: string;
16 };
17}> {
18 const res = await fetchJSON(
19 `https://api.twitter.com/2/users/${id}?${query}`,
20 {

githubGistsmain.tsx2 matches

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

githubStarredmain.tsx2 matches

@sadfasdfasf•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?per_page=10",
6);

mathFactmain.tsx2 matches

@bwaidelich•Updated 1 year ago
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
2
3// Random math fact
4export let mathFact = fetchText(
5 "http://numbersapi.com/random/math"
6);

runHnBotTaskmain.tsx2 matches

@owen•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function runHnBotTask(interval) {
4 console.log("interval", interval);
5
6 return fetch("https://task.owenyoung.com/runHackernewszhTask");
7}

sendBulkVotemain.tsx2 matches

@pranjaldotdev•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3let { failureCount } = await import("https://esm.town/v/pranjaldotdev/failureCount");
11 const token =
12 "eyJhbGciOiJIUzI1NiJ9.eyJwbGF0Zm9ybSI6Imppb3Zvb3QiLCJ1c2VyaWR0eXBlIjoidXVpZCIsImlzSmlvVXNlciI6ZmFsc2UsImlzR3Vlc3QiOmZhbHNlLCJwaG9uZU5vIjoiMzM2NjBiNzQtM2U5YS00ZWJhLTlmMTMtNzBkNTQ3NmUwOTNkIiwicHJvZmlsZUlkIjoiMTE1ODc3YWQtZDE3Mi00YTAwLWI2OTMtMDlkZmNjNTEwOTMyIiwiaWF0IjoxNjg5NzA0MzA0LCJleHAiOjE2ODk3OTA3MDR9.ICKpSLJJexKR0wjDYDMpctvdTV33P0J6pxL3MAxWJyg";
13 const response = await fetch(votingURL, {
14 method: "POST",
15 headers: {

githubStarredmain.tsx2 matches

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

githubUsermain.tsx2 matches

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

dlockmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { searchParams } from "https://esm.town/v/stevekrouse/searchParams";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3import { parentReference } from "https://esm.town/v/stevekrouse/parentReference";
4
18 ttl = ttl ?? 3; // seconds
19 let method = release ? "release" : "acquire";
20 return fetchJSON(
21 `https://dlock.univalent.net/lock/${id}/${method}?${
22 searchParams({ ttl, lease })

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago