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%22Optional%20title%22?q=function&page=2&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 18422 results for "function"(897ms)

nicoFunctionScript2 file matches

@stevekrouse•Updated 1 year ago

functionZilla1 file match

@sdan•Updated 1 year ago

chatSampleFunctionExtraction2 file matches

@webup•Updated 1 year ago

chatSampleFunctionMultiple2 file matches

@webup•Updated 1 year ago

chatSampleFunctionSingle2 file matches

@webup•Updated 1 year ago

multiplicationFunctionTest1 file match

@rodrigotello•Updated 1 year ago

chatSampleFunctionTagging2 file matches

@webup•Updated 1 year ago

FunctionToHTMLForm1 file match

@rodrigotello•Updated 1 year ago

EEPMOnitoringApp.tsx7 matches

@solomonferede•Updated 24 mins ago
25};
26
27// --- Helper Functions ---
28async function hashPassword(password) {
29 const encoder = new TextEncoder();
30 const data = encoder.encode(password);
36
37// --- Main App Component ---
38function App() {
39 const [user, setUser] = useState(null);
40 const [view, setView] = useState("login"); // 'login', 'news', 'media', 'report'
247Client-side Entry Point
248==========================*/
249function client() {
250 const rootElement = document.getElementById("root");
251 if (rootElement) {
263Server-side Logic (Val Town / Deno Deploy)
264==========================*/
265// The server function remains the same as in the previous single-file solution,
266// as it handles API requests and serves the main HTML.
267// Its logic is independent of how the client-side components are structured into files.
268export default async function server(
269 request, /*: Request // Removed type for broader compatibility if not in TS env */
270) /*: Promise<Response>*/ {
638 if (path === "/" && method === "GET") {
639 // The module script src will be this file itself.
640 // The client() function will be called.
641 // The component imports like "./components/login.tsx" will be resolved by the environment
642 // (e.g., Val Town's bundler or a local dev server/bundler).

stevensDemotestDailyBrief.ts1 match

@lm3m•Updated 25 mins ago
4import { DateTime } from "https://esm.sh/luxon@3.4.4";
5
6export async function testDailyBrief() {
7 try {
8 const testChatId = Deno.env.get("TEST_TELEGRAM_CHAT_ID");
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.