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/?q=fetch&page=295&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 3114 results for "fetch"(314ms)

hnSearchByDatemain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export let hnSearchByDate = (params) => fetchJSON(
4 `http://hn.algolia.com/api/v1/search_by_date?${new URLSearchParams(params)}`
5)

fetchDateMeProfilesmain.tsx3 matches

@stevekrouse•Updated 1 year ago
1import { dateMeURL } from "https://esm.town/v/stevekrouse/dateMeURL";
2import { fetchTable } from "https://esm.town/v/stevekrouse/fetchTable";
3
4export const fetchDateMeProfiles = () =>
5 fetchTable(
6 dateMeURL,
7 ) as Promise<{

xevalmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { eval_ } from "https://esm.town/v/stevekrouse/eval_";
2import { fetchTweet } from "https://esm.town/v/dpetrouk/fetchTweet?v=35";
3
4export let xeval = async (req: Request) => {
5 let tweet, code, result;
6 try {
7 tweet = await fetchTweet(req.url);
8 code = tweet.text.split("```")[1]
9 .trim()

valtownAPIExamplesmain.tsx3 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export let valtownAPIExamples = [
4 "https://api.val.town/v1/alias/stevekrouse",
5 "https://api.val.town/v1/users/a0bf3b31-15a5-4d5c-880e-4b1e22c9bc18",
6 "https://api.val.town/v1/alias/stevekrouse/fetchJSON",
7 "https://api.val.town/v1/vals/18b54b4e-779a-4c56-8ee6-4c75af7e55f0",
8].map(fetchJSON);

getMessagesmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { discordBotToken } from "https://esm.town/v/stevekrouse/discordBotToken";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export let getMessages = (channelId) => fetchJSON(
5 `https://discord.com/api/channels/${channelId}/messages`, {
6 headers: {

safeCountermain.tsx1 match

@stevekrouse•Updated 1 year ago
19 // Note 1: If I referenced @stevekrouse.threadsafeStateEx here
20 // it would return the value of that val at the beginning of this function,
21 // before I acquired the lock. I fetch it's value now to get the most up-to-date
22 // value of it, now that I know it can't be updated until I release this lock.
23 //

arenaApiExamplemain.tsx2 matches

@tmcw•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let arenaApiExample = (async () => {
4 const resp = await fetch(
5 "http://api.are.na/v2/channels/that-glassy-dark-design-style",
6 );

runGETmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export let runGET = fetchJSON(
4 `https://api.val.town/v1/run/stevekrouse.add?args=${JSON.stringify([1, 2])}`,
5);

getDiscordChannelsmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { discordFetch } from "https://esm.town/v/stevekrouse/discordFetch";
2
3export let getDiscordChannels = (token, guildId) => discordFetch(
4 token,
5 `guilds/${guildId}/channels`

dateMeNYWomenmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchDateMeProfiles } from "https://esm.town/v/stevekrouse/fetchDateMeProfiles";
2
3// date me docs of women in nyc
4export let dateMeNYWomen = fetchDateMeProfiles().then((
5 profiles,
6) =>

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

tweetFetcher2 file matches

@nbbaier•Updated 1 week ago