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=1212&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 13469 results for "fetch"(1185ms)

honoTanaEndpointmain.tsx1 match

@nbbaier•Updated 1 year ago
32 });
33
34 return app.fetch(req);
35};

createValmain.tsx2 matches

@andreterron•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export const createVal = async ({ code, token, name, privacy }: {
7 privacy?: "public" | "unlisted" | "private";
8}) => {
9 return fetchJSON("https://api.val.town/v1/vals", {
10 method: "post",
11 bearer: token,

longest_valmain.tsx2 matches

@andreterron•Updated 1 year ago
1import { paginateAPI } from "https://esm.town/v/andreterron/paginateAPI";
2import { API_URL } from "https://esm.town/v/std/API_URL?v=5";
3import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
4
5let max: { lines: number; name: string } | undefined;
10 },
11};
12const me = await fetchJSON(
13 `${API_URL}/v1/me`,
14 opts,

draftReadmemain.tsx3 matches

@nbbaier•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch?v=4";
2import OpenAI, { type ClientOptions } from "npm:openai";
3
25async function getVal(username: string, valName: string) {
26 try {
27 const res = await fetch(`https://api.val.town/v1/alias/${username}/${valName}`, {
28 method: "GET",
29 headers: {
67async function updateReadme(id: string, readme: string) {
68 try {
69 const res = await fetch(`https://api.val.town/v1/vals/${id}`, {
70 method: "PUT",
71 headers: {

readmeGPTmain.tsx3 matches

@nbbaier•Updated 1 year ago
1import { type WriterOptions } from "https://esm.town/v/nbbaier/WriterOptions";
2import { fetch } from "https://esm.town/v/std/fetch?v=4";
3import OpenAI, { type ClientOptions } from "npm:openai";
4
32 private async getVal(username: string, valName: string) {
33 try {
34 const res = await fetch(`https://api.val.town/v1/alias/${username}/${valName}`, {
35 method: "GET",
36 headers: {
72 private async updateReadme(id: string, readme: string) {
73 try {
74 const res = await fetch(`https://api.val.town/v1/vals/${id}`, {
75 method: "PUT",
76 headers: {

retrievalPracticemain.tsx1 match

@petermillspaugh•Updated 1 year ago
151 fillBlank: FILL_BLANK,
152 quiz: QUIZ,
153 fetchHtml: (email: string, lesson: number) =>
154 generateLessonHtml({
155 email,

sendDailyLessonsmain.tsx1 match

@petermillspaugh•Updated 1 year ago
43 replyTo: "pete@petemillspaugh.com",
44 subject: `Lesson ${nextLesson + 1}: ${lessons[nextLesson].title}`,
45 html: lessons[nextLesson].fetchHtml(emailAddress, nextLesson),
46 });
47 }

sendLessonmain.tsx1 match

@petermillspaugh•Updated 1 year ago
26 replyTo: "pete@petemillspaugh.com",
27 subject: `Lesson ${lesson + 1}: ${lessons[lesson].title}`,
28 html: lessons[lesson].fetchHtml(emailAddress, lesson),
29 });
30}

learningAboutLearningmain.tsx1 match

@petermillspaugh•Updated 1 year ago
61 fillBlank: FILL_BLANK,
62 quiz: QUIZ,
63 fetchHtml: (email: string, lesson: number) =>
64 generateLessonHtml({
65 email,

yourBrainmain.tsx1 match

@petermillspaugh•Updated 1 year ago
82 fillBlank: FILL_BLANK,
83 quiz: QUIZ,
84 fetchHtml: (email: string, lesson: number) =>
85 generateLessonHtml({
86 email,

GithubPRFetcher

@andybak•Updated 2 days ago

proxiedfetch1 file match

@jayden•Updated 3 days ago