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=678&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 8234 results for "fetch"(818ms)

sqlitePublicmain.tsx1 match

@vladimyr•Updated 1 year ago
28app.post("/execute", toHonoHandler(sqliteServer.handleExecute));
29app.post("/batch", toHonoHandler(sqliteServer.handleBatch));
30export default app.fetch;
31
32export const { httpEndpoint: ENDPOINT } = extractValInfo(import.meta.url);

sqliteExplorerAppmain.tsx1 match

@pps•Updated 1 year ago
207});
208
209export default app.fetch;

sqlitePublicmain.tsx3 matches

@pps•Updated 1 year ago
23
24async function execute(statement: InStatement): Promise<ResultSet> {
25 const res = await fetch(`${ENDPOINT}/execute`, {
26 method: "POST",
27 body: JSON.stringify({ statement }),
34
35async function batch(statements: InStatement[]): Promise<ResultSet[]> {
36 const res = await fetch(`${ENDPOINT}/batch`, {
37 method: "POST",
38 body: JSON.stringify({ statements }),
61});
62
63export default app.fetch;

aspBadgemain.tsx2 matches

@vladimyr•Updated 1 year ago
3 AspeURI,
4 calculateFingerprint,
5 fetchASP,
6 formatFingerprint,
7 getKeyId,
87 let fingerprint;
88 if ("keyId" in aspeURI) {
89 const asp = await fetchASP(aspeURI.keyId, aspeURI.hostname);
90 fingerprint = calculateFingerprint(asp);
91 } else {

dailyPelotonEmailRemindermain.tsx2 matches

@tarngerine•Updated 1 year ago
1import { fetchPelotonWorkouts } from "https://esm.town/v/andreterron/fetchPelotonWorkouts";
2import { email } from "https://esm.town/v/std/email?v=9";
3import process from "node:process";
5
6export default async function checkTodayWorkout() {
7 const data = await fetchPelotonWorkouts(
8 "3f5bf759bb65494d8b35d26ec72b7340",
9 process.env.pelotonSessionId,

blob_adminmain.tsx2 matches

@parkerdavis•Updated 1 year ago
1/** @jsxImportSource https://esm.sh/hono@4.0.8/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import view_route from "https://esm.town/v/pomdtr/blob_admin_blob";
5import create_route from "https://esm.town/v/pomdtr/blob_admin_create";
88});
89
90export default modifyFetchHandler(passwordAuth(app.fetch));

azureBirdmain.tsx2 matches

@andreterron•Updated 1 year ago
2import process from "node:process";
3import { pelotonUserId } from "https://esm.town/v/andreterron/pelotonUserId";
4import { fetchPelotonWorkouts } from "https://esm.town/v/andreterron/fetchPelotonWorkouts";
5
6console.log(await fetchPelotonWorkouts(
7 pelotonUserId,
8 process.env.pelotonSessionId

commentsREADME.md2 matches

@parkerdavis•Updated 1 year ago
7
8const getComments = async () => {
9 const response = await fetch(MY_FORKED_VAL_URL);
10 const json = await response.json();
11 return json;
14const addComment = async (str) => {
15 try {
16 const response = await fetch(MY_FORKED_VAL_URL, {
17 method: "POST",
18 body: JSON.stringify(str),

commentsmain.tsx1 match

@parkerdavis•Updated 1 year ago
22 return c.text("Added comment!", 200);
23});
24export default app.fetch;

licenseBadgemain.tsx3 matches

@vladimyr•Updated 1 year ago
1// SPDX-License-Identifier: 0BSD
2import { fetchVal } from "https://esm.town/v/vladimyr/fetchVal";
3import { formatLicenseInfo, parseLicenseInfo } from "https://esm.town/v/vladimyr/parseLicense";
4import { serveReadme } from "https://esm.town/v/vladimyr/serveReadme";
13 let badgeOptions: BadgenOptions = { label: "license", status: undefined };
14 try {
15 const { code } = await fetchVal(author, name);
16 try {
17 const info = parseLicenseInfo(code);
31});
32
33export default router.fetch;

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago