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/$%7Burl%7D?q=fetch&page=688&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 9011 results for "fetch"(1959ms)

hnResumemain.tsx2 matches

@cw12•Updated 10 months ago
6 const hnStoryURL = "https://hacker-news.firebaseio.com/v0/item/";
7
8 const topStories = await fetch(hnTopStoriesURL).then((res) => res.json());
9 const firstFive = topStories.slice(0, 50);
10 const stories = await Promise.all(
11 firstFive.map((id: number) => fetch(`${hnStoryURL}${id}.json`).then((res) => res.json())),
12 );
13

sqliteExplorerAppmain.tsx4 matches

@amotivv•Updated 10 months ago
1/** @jsxImportSource https://esm.sh/hono@latest/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import { iframeHandler } from "https://esm.town/v/nbbaier/iframeHandler";
5import { resetStyle } from "https://esm.town/v/nbbaier/resetStyle";
16import { verifyToken } from "https://esm.town/v/pomdtr/verifyToken";
17import { ResultSet, sqlite } from "https://esm.town/v/std/sqlite";
18import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
19import { Hono } from "npm:hono";
20import type { FC } from "npm:hono/jsx";
175});
176
177export const handler = app.fetch;
178export default iframeHandler(modifyFetchHandler(passwordAuth(handler, { verifyPassword: verifyToken })));

createValVersionmain.tsx2 matches

@neverstew•Updated 10 months ago
1// my inserted comment
2 import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3
4export function createValVersion({ token, valId, code }: {
26 referenceCount: number;
27}> {
28 return fetchJSON(
29 `https://api.val.town/v1/vals/${valId}/versions`,
30 {

pingNationsmain.tsx1 match

@bohaska•Updated 10 months ago
16 const myHeaders = new Headers(httpHeaders);
17 console.log("Starting...");
18 let response = await fetch(
19 `https://www.nationstates.net/cgi-bin/api.cgi?nation=${nations[i]}&q=issues`,
20 {

blob_adminmain.tsx2 matches

@amotivv•Updated 10 months 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";
133});
134
135export default modifyFetchHandler(passwordAuth(app.fetch));

nationstatesSentimentAImain.tsx3 matches

@bohaska•Updated 10 months ago
10
11async function query(data) {
12 const response = await fetch(
13 "https://api-inference.huggingface.co/models/cardiffnlp/twitter-roberta-base-sentiment-latest",
14 {
33 const myHeaders = new Headers(httpHeaders);
34 console.log("Starting...");
35 let response = await fetch(
36 `https://www.nationstates.net/cgi-bin/api.cgi?nation=${Deno.env.get("NATION_ID")}&q=issues`,
37 {
70 await Promise.all(optionPromises);
71
72 let execute_issue = await fetch(
73 `https://www.nationstates.net/cgi-bin/api.cgi?nation=${
74 Deno.env.get("NATION_ID")

test_explorermain.tsx1 match

@maxm•Updated 10 months ago
3export { Test } from "https://esm.town/v/pomdtr/test";
4
5export default router.fetch;

dubLinkMakermain.tsx2 matches

@mux•Updated 10 months ago
57 // If the destination is `list`, return a list of all the existing short links
58 if (destination === "list") {
59 const req = await fetch(`https://api.dub.co/links?workspaceId=${dubWorkspaceId}`, {
60 headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json" },
61 });
84
85 try {
86 const resp = await fetch(`https://api.dub.co/links?workspaceId=${dubWorkspaceId}`, options).then(
87 response => response.json(),
88 );

steampipeQuerymain.tsx1 match

@pomdtr•Updated 10 months ago
1const query = "select title, url from hackernews_top limit 10;";
2
3const resp = await fetch(`https://steampipe.pomdtr.me/query/${encodeURIComponent(query)}?output=json`, {
4 headers: {
5 Authorization: "Bearer " + Deno.env.get("SMALLWEB_TOKEN"),

query_aian_lar_map_servermain.tsx1 match

@parkerziegler•Updated 10 months ago
3 `https://biamaps.geoplatform.gov/server/rest/services/DivLTR/BIA_AIAN_National_LAR/MapServer/0/query?where=1%3D1&text=&objectIds=&time=&timeRelation=esriTimeRelationOverlaps&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&distance=&units=esriSRUnit_Foot&relationParam=&outFields=&returnGeometry=true&returnTrueCurves=false&maxAllowableOffset=&geometryPrecision=&outSR=&havingClause=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&historicMoment=&returnDistinctValues=false&resultOffset=&resultRecordCount=&returnExtentOnly=false&sqlFormat=none&datumTransformation=&parameterValues=&rangeValues=&quantizationParameters=&featureEncoding=esriDefault&f=geojson`;
4
5fetch(endpoint)
6 .then((res) => res.json())
7 .then((data) => {

TAC_FetchBasic2 file matches

@A7_OMC•Updated 8 hours ago

hn-fetch1 file match

@matija•Updated 10 hours ago