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/$2?q=fetch&page=1263&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 13286 results for "fetch"(1290ms)

commentsmain.tsx2 matches

@neverstew•Updated 1 year ago
1import { searchParams } from "https://esm.town/v/stevekrouse/searchParams?v=9";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3
4export function comments({ token, relationship, since, until, offset, limit }: {
34 };
35}> {
36 return fetchJSON(
37 "https://api.val.town/v1/me/comments?" +
38 searchParams({

fetchJSONmain.tsx3 matches

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

dailyMathFactmain.tsx2 matches

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

browserlessScrapeExamplemain.tsx2 matches

@jessmartin•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3
4export const browserlessScrapeExample = (async () => {
5 const res = await fetch(
6 `https://chrome.browserless.io/screenshot?token=${process.env.browserlessKey}`,
7 {

doeMenuResponseStoremain.tsx2 matches

@tal•Updated 1 year ago
2export let doeMenuResponseStore = {
3 "2023-2024|September|pre-k---8-express-hot-lunch-menu": {
4 "lastFetchedAt": "2023-09-30T23:10:59.401Z",
5 "lines": [{
6 "dateStr": "Date",
408 },
409 "2023-2024|October|pre-k---8-express-hot-lunch-menu": {
410 "lastFetchedAt": "2023-10-23T16:31:55.351Z",
411 "lines": [{
412 "dateStr": "Date",

get_weathermain.tsx2 matches

@malloc•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let get_weather = async function () {
4 let response = await fetch(
5 "https://api.open-meteo.com/v1/forecast?latitude=49.26&longitude=-123.07&current_weather=true"
6 );

wee2main.tsx2 matches

@val•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/val/fetchJSON";
2
3export let wee2 = fetchJSON(
4 "https://api.val.town/express/@val.wee1",
5 {

getInformationOfTheGitHubReposirotymain.tsx2 matches

@tzq•Updated 1 year ago
1import process from "node:process";
2import { fetchJSON } from "https://esm.town/v/dvergin/fetchJSON?v=2";
3
4export async function getInformationOfTheGitHubReposiroty(repository) {
5 return await fetchJSON(`https://api.github.com/repos/${repository}`, {
6 headers: {
7 Accept: "application/vnd.github+json",

coolHnPostsmain.tsx2 matches

@VictorForissier•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function coolHnPosts(id) {
4 return fetch("https://hn.algolia.com/api/v1/search_by_date?tags=author_" + id)
5 .then((res) => res.json())
6 .then((res) => res.hits[0].comment_text);

GetPelotonWorkoutsmain.tsx3 matches

@steveb1313•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3
6 res: express.Response,
7) {
8 let response = await fetch("https://api.onepeloton.com/auth/login", {
9 method: "POST",
10 mode: "no-cors",
20 });
21 const session = await response.json();
22 let workoutResponse = await fetch(
23 `https://api.onepeloton.com/api/user/${session["user_id"]}/workouts`,
24 {

GithubPRFetcher

@andybak•Updated 1 day ago

proxiedfetch1 file match

@jayden•Updated 1 day ago