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=676&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"(1327ms)

signInWithValTownDemomain.tsx1 match

@easrng•Updated 1 year ago
131 );
132});
133export default signInWithValTown(app.fetch);

buttonmain.tsx2 matches

@easrng•Updated 1 year ago
5 for (const urlMatch of cssString.matchAll(urlRegex)) {
6 const originalUrl = urlMatch[1];
7 const response = await fetch(originalUrl);
8 const data = new Uint8Array(await response.arrayBuffer());
9 result = result.replace(
26 let fontCss = "";
27 try {
28 const r = await fetch(
29 "https://fonts.googleapis.com/css2?family="
30 + encodeURIComponent("IBM Plex Sans:wght@600")

usermain.tsx1 match

@easrng•Updated 1 year ago
10 profileImageUrl: string;
11}> =>
12 await (await fetch(`${API_URL}/v1/users/${id}`, {
13 headers: token
14 ? {

aliasmain.tsx1 match

@easrng•Updated 1 year ago
9 if ("valName" in params && params.token)
10 headers.Authorization = `Bearer ${params.token}`;
11 return await (await fetch(url, { headers })).json();
12}
13type UserParams = {

dbmain.tsx1 match

@sqlite•Updated 1 year ago
3
4async function execute(statement: InStatement): Promise<ResultSet> {
5 const resp = await fetch("https://sqlite-execute.web.val.run", {
6 method: "POST",
7 body: JSON.stringify({

leaderboardmain.tsx1 match

@pomdtr•Updated 1 year ago
10 const table = stripAnsi(renderTable(zip(res)));
11
12 const resp = await fetch("https://sourcecodeshots.com/api/image", {
13 method: "POST",
14 headers: {

duckdbExamplemain.tsx2 matches

@neverstew•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import "https://deno.land/x/xhr@0.3.1/mod.ts";
3
4export let duckdbExample = (async () => {
5 async function createWorker(url: string) {
6 const workerScript = await fetch(url);
7 const workerURL = URL.createObjectURL(await workerScript.blob());
8 return new Worker(workerURL, { type: "module" });

manifold_daily_loan_collectormain.tsx1 match

@jackc•Updated 1 year ago
1export default async function() {
2 const res = await fetch("https://api.manifold.markets/request-loan", {
3 headers: {
4 Authorization: `Key ${Deno.env.get("manifoldApiKey")}`,

valtownToSQLitemain.tsx1 match

@postpostscript•Updated 1 year ago
62 let url = "https://api.val.town/v1/search/vals?query=%20&limit=100";
63 while (true) {
64 const resp = await fetch(url);
65 if (!resp.ok) {
66 throw new Error(await resp.text());

createmain.tsx1 match

@websandbox•Updated 1 year ago
1export async function create({ code, token }: { code: string; token: string }) {
2 const { error, details, url } = await (await fetch("https://websandbox-createAPI.web.val.run", {
3 body: JSON.stringify({ code, token }),
4 method: "POST",

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago