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?q=function&page=5&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 24819 results for "function"(892ms)

Fadwa_JobBoard_ChatAppREADME.md1 match

@FaRakโ€ขUpdated 2 hours ago
16โ”‚ โ”œโ”€โ”€ database/
17โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Database schema setup
18โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # Database query functions
19โ”‚ โ”œโ”€โ”€ routes/
20โ”‚ โ”‚ โ”œโ”€โ”€ jobs.ts # Job posting endpoints

ValTownForNotionindex.html2 matches

@canstralianโ€ขUpdated 2 hours ago
68 const initialData = window.__INITIAL_DATA__ || {};
69
70 function App() {
71 const [code, setCode] = useState('// Paste your code here for AI-powered review\nfunction example() {\n var x = 1;\n if (x = 1) {\n console.log("Hello World");\n }\n}');
72 const [language, setLanguage] = useState('javascript');
73 const [filename, setFilename] = useState('');

ValTownForNotioncode-parser.ts2 matches

@canstralianโ€ขUpdated 2 hours ago
34 private static detectLanguageByContent(code: string): string {
35 const patterns = [
36 { lang: 'javascript', patterns: [/\bfunction\b/, /\bconst\b/, /\blet\b/, /\bvar\b/, /=>/] },
37 { lang: 'typescript', patterns: [/\binterface\b/, /\btype\b/, /:\s*\w+/, /\bas\b/] },
38 { lang: 'python', patterns: [/\bdef\b/, /\bimport\b/, /\bfrom\b.*\bimport\b/, /\bclass\b.*:/] },
152 const complexityIndicators = [
153 /\bif\b/g, /\belse\b/g, /\bfor\b/g, /\bwhile\b/g,
154 /\bswitch\b/g, /\btry\b/g, /\bcatch\b/g, /\bfunction\b/g,
155 /\bclass\b/g, /\binterface\b/g
156 ];

SchoolBankMessageCenter.tsx1 match

@Maruelโ€ขUpdated 2 hours ago
7}
8
9export default function MessageCenter({ user }: MessageCenterProps) {
10 const [messages, setMessages] = useState<Message[]>([]);
11 const [loading, setLoading] = useState(true);

SchoolBankStudentForm.tsx1 match

@Maruelโ€ขUpdated 2 hours ago
9}
10
11export default function StudentForm({ user, student, onNavigate }: StudentFormProps) {
12 const isEditing = !!student;
13

SchoolBankStudentList.tsx1 match

@Maruelโ€ขUpdated 2 hours ago
8}
9
10export default function StudentList({ user, onNavigate }: StudentListProps) {
11 const [students, setStudents] = useState<Student[]>([]);
12 const [loading, setLoading] = useState(true);

SchoolBankDashboard.tsx1 match

@Maruelโ€ขUpdated 2 hours ago
8}
9
10export default function Dashboard({ user, onNavigate }: DashboardProps) {
11 const [stats, setStats] = useState<DashboardStats | null>(null);
12 const [loading, setLoading] = useState(true);

SchoolBankLogin.tsx1 match

@Maruelโ€ขUpdated 2 hours ago
7}
8
9export default function Login({ onLogin }: LoginProps) {
10 const [formData, setFormData] = useState<LoginRequest>({
11 username: '',

SchoolBankApp.tsx1 match

@Maruelโ€ขUpdated 2 hours ago
17}
18
19export default function App() {
20 const [state, setState] = useState<AppState>({
21 user: null,

ai_comments_to_tasksindex.tsx6 matches

@arthrodโ€ขUpdated 2 hours ago
59
60// Markdown renderer component
61function MarkdownRenderer({ content }: { content: string }) {
62 const renderMarkdown = (text: string) => {
63 return text
110
111// Severity badge component
112function SeverityBadge({ severity }: { severity: string }) {
113 const colors = {
114 low: 'bg-green-500',
126
127// Chunk type badge component
128function ChunkTypeBadge({ type }: { type: string }) {
129 const colors = {
130 bot_review: 'bg-blue-500',
151
152// Individual chunk analysis component
153function ChunkAnalysisCard({ analysis }: { analysis: ChunkAnalysis }) {
154 // Ensure all data is properly formatted for rendering
155 const safeAnalysis = {
261}
262
263function App() {
264 const [prText, setPrText] = useState("");
265 const [analysis, setAnalysis] = useState<AnalysisResponse | null>(null);
538
539// Mount the app with error handling
540function mountApp() {
541 try {
542 const rootElement = document.getElementById("root");

getFileEmail4 file matches

@shouserโ€ขUpdated 1 month ago
A helper function to build a file's email
tuna

tuna8 file matches

@jxnblkโ€ขUpdated 1 month ago
Simple functional CSS library for Val Town
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.