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=function&page=29&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=function

Returns an array of strings in format "username" or "username/projectName"

Found 29011 results for "function"(1369ms)

steamForumMentionsmain.tsx1 match

@charmaineUpdated 1 day ago
1import scanSteamForums from "https://esm.town/v/dreww/steamforumscanner";
2
3export default async function(interval: Interval) {
4 const dota2Threads = await scanSteamForums({
5 gameName: "Apex Legends",
68}
69
70async function makeGigyaRequest(endpoint: string, params: Record<string, any>): Promise<GigyaResponse> {
71 const url = `https://${GIGYA_DOMAIN}/${endpoint}?httpStatusCodes=true`;
72
93}
94
95function isTestProject(title: string): { isMatch: boolean; reason: string } {
96 const originalTitle = title.trim();
97 const checkTitle = CONFIG.caseSensitive ? originalTitle : originalTitle.toLowerCase();
125}
126
127async function analyzeProjects(): Promise<void> {
128 console.log("🔍 Analyzing projects for test patterns...");
129
192}
193
194async function confirmDeletion(projectCount: number): Promise<boolean> {
195 if (!CONFIG.requireConfirmation) {
196 console.log("⚠️ Confirmation skipped (REQUIRE_CONFIRMATION=false)");
216}
217
218async function deleteTestProjects(): Promise<DeletionStats> {
219 console.log(`\n🗑️ Starting test project deletion... ${CONFIG.dryRun ? "(DRY RUN)" : ""}`);
220
318}
319
320async function generateReport(stats: DeletionStats): Promise<void> {
321 console.log("\n📊 Final Deletion Report:");
322 console.log("=".repeat(50));
338}
339
340async function verifyDeletion(): Promise<void> {
341 if (CONFIG.dryRun) return;
342
391
392// Main execution
393async function main() {
394 console.log("🚀 Advanced Test Project Deletion Script");
395 console.log("=".repeat(50));
hono-client-starter

hono-client-starterApp.tsx1 match

@jxnblkUpdated 1 day ago
2import { useState } from "https://esm.sh/hono/jsx";
3
4export function App () {
5 const [count, setCount] = useState(0);
6

osdelete-test-projects.ts4 matches

@dinavinterUpdated 1 day ago
41}
42
43async function makeGigyaRequest(endpoint: string, params: Record<string, any>): Promise<GigyaResponse> {
44 const url = `https://${GIGYA_DOMAIN}/${endpoint}?httpStatusCodes=true`;
45
66}
67
68function isTestProject(title: string): boolean {
69 const normalizedTitle = title.toLowerCase().trim();
70 return normalizedTitle === "test" || normalizedTitle.startsWith("test");
71}
72
73async function deleteTestProjects() {
74 console.log("🔍 Starting test project deletion process...");
75
166}
167
168async function verifyDeletion() {
169 console.log("\n🔍 Verifying deletion...");
170

Teamcontrollers.ts3 matches

@dpGlanceUpdated 1 day ago
10const vt = new ValTown();
11
12export async function getValTownUser(username: string) {
13 try {
14 return await vt.alias.username.retrieve(username);
18}
19
20export async function getNotionPage(id: string) {
21 try {
22 return await notion.pages.retrieve({
28}
29
30export async function setNotionPage(id: string, data: any) {
31 // bio might be empty (optional field)
32 const bio = data.bio

Dumperindex.ts1 match

@wolfUpdated 1 day ago
1import { blob } from "https://esm.town/v/std/blob";
2
3export default async function(req: Request): Promise<Response> {
4 const STORAGE_KEY = "last_payload";
5
httpdelay

httpdelayhttp.tsx1 match

@slavakUpdated 1 day ago
1export async function httpHandler(req: Request): Promise<Response> {
2 const url = new URL(req.url);
3 if (url.pathname === "/") {

StubFSstubFs.ts28 matches

@wolfUpdated 1 day ago
8fs.promises.copyFile = async () => {};
9fs.promises.cp = async () => {};
10fs.promises.glob = async function*() {};
11fs.promises.lchmod = async () => {};
12fs.promises.lchown = async () => {};
38 close: async () => {}, closeSync: () => {},
39 read: async () => null, readSync: () => null,
40 [Symbol.asyncIterator]: async function*() {},
41 [Symbol.asyncDispose]: async () => {},
42 [Symbol.dispose]: () => {}
55fs.promises.unlink = async () => {};
56fs.promises.utimes = async () => {};
57fs.promises.watch = async function*() {};
58fs.promises.writeFile = async () => {};
59
60fs.access = (path, mode, callback) => { if (typeof mode === 'function') mode(); else callback?.(); };
61fs.appendFile = (path, data, options, callback) => { if (typeof options === 'function') options(); else callback?.(); };
62fs.chmod = (path, mode, callback) => callback?.();
63fs.chown = (path, uid, gid, callback) => callback?.();
64fs.close = (fd, callback) => callback?.();
65fs.copyFile = (src, dest, mode, callback) => { if (typeof mode === 'function') mode(); else callback?.(); };
66fs.cp = (src, dest, options, callback) => { if (typeof options === 'function') options(); else callback?.(); };
67fs.createReadStream = () => ({ bytesRead: 0, path: "", pending: false });
68fs.createWriteStream = () => ({ bytesWritten: 0, path: "", pending: false, close: (cb) => cb?.() });
72fs.fdatasync = (fd, callback) => callback?.();
73fs.fstat = (fd, options, callback) => {
74 if (typeof options === 'function') options(null, fs.promises.lstat());
75 else callback?.(null, fs.promises.lstat());
76};
77fs.fsync = (fd, callback) => callback?.();
78fs.ftruncate = (fd, len, callback) => { if (typeof len === 'function') len(); else callback?.(); };
79fs.futimes = (fd, atime, mtime, callback) => callback?.();
80fs.glob = (pattern, options, callback) => {
81 if (typeof options === 'function') options(null, []);
82 else callback?.(null, []);
83};
87fs.link = (existingPath, newPath, callback) => callback?.();
88fs.lstat = (path, options, callback) => {
89 if (typeof options === 'function') options(null, fs.promises.lstat());
90 else callback?.(null, fs.promises.lstat());
91};
92fs.mkdir = (path, options, callback) => { if (typeof options === 'function') options(); else callback?.(); };
93fs.mkdtemp = (prefix, options, callback) => {
94 if (typeof options === 'function') options(null, "");
95 else callback?.(null, "");
96};
97fs.open = (path, flags, mode, callback) => {
98 if (typeof mode === 'function') mode(null, 0);
99 else callback?.(null, 0);
100};
101fs.openAsBlob = async () => new Blob();
102fs.opendir = (path, options, callback) => {
103 if (typeof options === 'function') options(null, fs.promises.opendir());
104 else callback?.(null, fs.promises.opendir());
105};
106fs.read = (fd, buffer, offset, length, position, callback) => callback(null, 0, buffer);
107fs.readdir = (path, options, callback) => {
108 if (typeof options === 'function') options(null, []);
109 else callback?.(null, []);
110};
111fs.readFile = (path, options, callback) => {
112 if (typeof options === 'function') options(null, Buffer.alloc(0));
113 else callback?.(null, Buffer.alloc(0));
114};
115fs.readlink = (path, options, callback) => {
116 if (typeof options === 'function') options(null, "");
117 else callback?.(null, "");
118};
119fs.readv = (fd, buffers, position, callback) => {
120 if (typeof position === 'function') position(null, { bytesRead: 0, buffers: [] });
121 else callback?.(null, { bytesRead: 0, buffers: [] });
122};
123fs.realpath = (path, options, callback) => {
124 if (typeof options === 'function') options(null, "");
125 else callback?.(null, "");
126};
127fs.rename = (oldPath, newPath, callback) => callback?.();
128fs.rmdir = (path, options, callback) => { if (typeof options === 'function') options(); else callback?.(); };
129fs.rm = (path, options, callback) => { if (typeof options === 'function') options(); else callback?.(); };
130fs.stat = (path, options, callback) => {
131 if (typeof options === 'function') options(null, fs.promises.lstat());
132 else callback?.(null, fs.promises.lstat());
133};
134fs.statfs = (path, options, callback) => {
135 if (typeof options === 'function') options(null, {});
136 else callback?.(null, {});
137};
138fs.symlink = (target, path, type, callback) => {
139 if (typeof type === 'function') type();
140 else callback?.();
141};
142fs.truncate = (path, len, callback) => { if (typeof len === 'function') len(); else callback?.(); };
143fs.unlink = (path, callback) => callback?.();
144fs.unwatchFile = (filename, listener) => {};
148fs.write = (fd, buffer, offset, length, position, callback) => callback(null, 0, buffer);
149fs.writeFile = (file, data, options, callback) => {
150 if (typeof options === 'function') options();
151 else callback?.();
152};
153fs.writev = (fd, buffers, position, callback) => {
154 if (typeof position === 'function') position(null, { bytesWritten: 0, buffers: [] });
155 else callback?.(null, { bytesWritten: 0, buffers: [] });
156};

MindfulMiles5-viernes.ts2 matches

@profMoishUpdated 1 day ago
1function sendNotification() {
2 const TOKEN = process.env.TELEGRAM_BOT_TOKEN;
3 const CHAT_ID = 1825527066;
26 * Главная функция cron-триггера
27 */
28export default async function() {
29 console.log(`⏰ Lunes Monday Понедельник`);
30 sendNotification();

MindfulMiles3-miercoles.ts2 matches

@profMoishUpdated 1 day ago
1function sendNotification() {
2 const TOKEN = process.env.TELEGRAM_BOT_TOKEN;
3 const CHAT_ID = 1825527066;
26 * Главная функция cron-триггера
27 */
28export default async function() {
29 console.log(`⏰ Lunes Monday Понедельник`);
30 sendNotification();
tuna

tuna9 file matches

@jxnblkUpdated 20 hours ago
Simple functional CSS library for Val Town

getFileEmail4 file matches

@shouserUpdated 1 month ago
A helper function to build a file's email
lost1991
import { OpenAI } from "https://esm.town/v/std/openai"; export default async function(req: Request): Promise<Response> { if (req.method === "OPTIONS") { return new Response(null, { headers: { "Access-Control-Allow-Origin": "*",
webup
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.