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=2356&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 31635 results for "function"(10727ms)

ai_pricingtypes2 matches

@nbbaier•Updated 4 months ago
81 litellm_provider: Provider;
82 mode: "chat" | "embedding" | "completion" | "image_generation" | "audio_transcription" | "audio_speech";
83 supports_function_calling: boolean;
84 supports_parallel_function_calling: boolean;
85 supports_vision: boolean;
86 supports_audio_input: boolean;

HTKhanAISearchmain.tsx5 matches

@Htkhan6•Updated 4 months ago
186
187// Loading Spinner Component
188function LoadingSpinner() {
189 return (
190 <div style={styles.spinnerContainer}>
199
200// Main App Component
201function App() {
202 const [query, setQuery] = useState("");
203 const [results, setResults] = useState(null);
375}
376
377// Client-side rendering function
378function client() {
379 createRoot(document.getElementById("root")).render(<App />);
380}
382
383// Server-side handler
384export default async function server(request: Request): Promise<Response> {
385 if (request.method === "POST") {
386 const { OpenAI } = await import("https://esm.town/v/std/openai");

distinguishedAmberCoralmain.tsx3 matches

@Hosianadamai•Updated 4 months ago
13];
14
15function App() {
16 const [noClicks, setNoClicks] = useState(0);
17 const [isValentine, setIsValentine] = useState(false);
98}
99
100function client() {
101 createRoot(document.getElementById("root")).render(<App />);
102}
103if (typeof document !== "undefined") { client(); }
104
105export default async function server(request: Request): Promise<Response> {
106 return new Response(
107 `

beamingMoccasinSquidmain.tsx3 matches

@Hosianadamai•Updated 4 months ago
13];
14
15function App() {
16 const [noClicks, setNoClicks] = useState(0);
17 const [isValentine, setIsValentine] = useState(false);
98}
99
100function client() {
101 createRoot(document.getElementById("root")).render(<App />);
102}
103if (typeof document !== "undefined") { client(); }
104
105export default async function server(request: Request): Promise<Response> {
106 return new Response(
107 `

ultimateGraySailfishmain.tsx3 matches

@Htkhan5•Updated 4 months ago
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5function App() {
6 const [query, setQuery] = useState('');
7 const [aiSummary, setAiSummary] = useState('');
473}
474
475function client() {
476 const style = document.createElement('style');
477 style.textContent = `
506if (typeof document !== "undefined") { client(); }
507
508export default async function server(request: Request): Promise<Response> {
509 if (request.method === 'POST') {
510 const { OpenAI } = await import("https://esm.town/v/std/openai");

valentinemain.tsx3 matches

@Hosianadamai•Updated 4 months ago
13];
14
15function App() {
16 const [noClicks, setNoClicks] = useState(0);
17 const [isValentine, setIsValentine] = useState(false);
98}
99
100function client() {
101 createRoot(document.getElementById("root")).render(<App />);
102}
103if (typeof document !== "undefined") { client(); }
104
105export default async function server(request: Request): Promise<Response> {
106 return new Response(
107 `

statusmonitor1 match

@brie•Updated 4 months ago
7);
8
9export async function uptimeCheck(url: string, attempt = 1) {
10 let reason: string = "";
11 let status: number | null = null;

statusstatus3 matches

@brie•Updated 4 months ago
9const thisURL = parseProject(import.meta.url).links.self.project;
10
11function StatusRow({ rows }) {
12 return (
13 <div className="w-full flex flex-col space-y-2">
31}
32
33function StatusSection({ url, rows }) {
34 const sectionRows = rows.filter(row => row[0] === url);
35 const percentUp = Math.round((sectionRows.filter(row => row[1]).length / sectionRows.length) * 100);
49}
50
51export default async function(req: Request): Promise<Response> {
52 const { rows } = await sqlite.execute(
53 "select url, ok, duration, timestamp, title from uptime order by timestamp desc limit 200",

statussparklineSVG1 match

@brie•Updated 4 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2export function SparklineSVG({ strokeWidth = 2, data = [], fill = "none", stroke = "black" }) {
3 const padding = 2;
4 const xMargin = 25;

statusnotify1 match

@brie•Updated 4 months ago
4const thisURL = parseProject(import.meta.url).links.self.latest;
5
6export async function notify(message: string) {
7 await email({ subject: message, text: `Email sent from ${thisURL}` });
8}
tuna

tuna9 file matches

@jxnblk•Updated 2 weeks ago
Simple functional CSS library for Val Town

getFileEmail4 file matches

@shouser•Updated 2 months 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.