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/?q=function&page=1066&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 17344 results for "function"(2192ms)

randomVideoChatAppmain.tsx4 matches

@ghouri•Updated 3 months ago
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5function RandomVideoChat() {
6 const [connectionStatus, setConnectionStatus] = useState("Disconnected");
7 const [isSearching, setIsSearching] = useState(false);
167}
168
169function App() {
170 return <RandomVideoChat />;
171}
172
173function client() {
174 createRoot(document.getElementById("root")).render(<App />);
175}
176if (typeof document !== "undefined") { client(); }
177
178export default async function server(request: Request): Promise<Response> {
179 return new Response(`
180 <html>

valTownInspoListmain.tsx1 match

@charmaine•Updated 3 months ago
119}, {
120 "title": "Generate PDFs",
121 "description": "Generate PDFs using val functions by using an external library like jsPDF",
122 "val": "@vtdocs.examplePDF",
123 image:

woffToTtfConvertermain.tsx4 matches

@g•Updated 3 months ago
7import { Hono } from 'npm:hono';
8
9function html() {
10 /*
11<!DOCTYPE html>
37}
38
39function css() {
40 /*
41:root {
143}
144
145function js() {
146 /*
147import { convert } from 'https://esm.sh/fontverter';
151const statusEl = document.getElementById('status');
152
153function handleFiles(files) {
154 if (files.length === 0) return;
155 const file = files[0];

constantGrayRavenmain.tsx10 matches

@RareVibesAiDad•Updated 3 months ago
6
7// Operational Data Science Tool Report Generator
8async function generateDataScienceToolReport() {
9 const openai = new OpenAI();
10
48
49 // Advanced Operational Analysis
50 async function generateOperationalInsights(category: string) {
51 const operationalCompletion = await openai.chat.completions.create({
52 model: "gpt-4o-mini",
95 "Phased technology adoption",
96 "Continuous skill development",
97 "Cross-functional team alignment",
98 "Agile technology integration",
99 ],
101
102 // Advanced Export and Analysis Methods
103 async function exportOperationalReportToJSON() {
104 const reportKey = `operational_report_${Date.now()}`;
105 await blob.setJSON(reportKey, fullOperationalReport);
107 }
108
109 async function generateComprehensiveOperationalAnalysis() {
110 const analysis = {
111 totalToolsCovered: dataScienceToolCategories.reduce((total, category) => total + category.tools.length, 0),
122 }
123
124 function calculateOperationalReadinessScore(tool) {
125 const scoreMap = {
126 learningCurve: {
158
159// React-based Operational Dashboard
160function OperationalToolDashboard() {
161 const [report, setReport] = useState(null);
162 const [analysis, setAnalysis] = useState(null);
164
165 useEffect(() => {
166 async function fetchOperationalReport() {
167 try {
168 const reportGenerator = await generateDataScienceToolReport();
229
230// Server-side Handler
231export default async function server(request: Request) {
232 return new Response(
233 `
251
252// Client-side Rendering
253function client() {
254 createRoot(document.getElementById("root")).render(<OperationalToolDashboard />);
255}

RareVibesBoostmain.tsx10 matches

@RareVibesAiDad•Updated 3 months ago
6
7// Operational Data Science Tool Report Generator
8async function generateDataScienceToolReport() {
9 const openai = new OpenAI();
10
48
49 // Advanced Operational Analysis
50 async function generateOperationalInsights(category: string) {
51 const operationalCompletion = await openai.chat.completions.create({
52 model: "gpt-4o-mini",
95 "Phased technology adoption",
96 "Continuous skill development",
97 "Cross-functional team alignment",
98 "Agile technology integration",
99 ],
101
102 // Advanced Export and Analysis Methods
103 async function exportOperationalReportToJSON() {
104 const reportKey = `operational_report_${Date.now()}`;
105 await blob.setJSON(reportKey, fullOperationalReport);
107 }
108
109 async function generateComprehensiveOperationalAnalysis() {
110 const analysis = {
111 totalToolsCovered: dataScienceToolCategories.reduce((total, category) => total + category.tools.length, 0),
122 }
123
124 function calculateOperationalReadinessScore(tool) {
125 const scoreMap = {
126 learningCurve: {
158
159// React-based Operational Dashboard
160function OperationalToolDashboard() {
161 const [report, setReport] = useState(null);
162 const [analysis, setAnalysis] = useState(null);
164
165 useEffect(() => {
166 async function fetchOperationalReport() {
167 try {
168 const reportGenerator = await generateDataScienceToolReport();
229
230// Server-side Handler
231export default async function server(request: Request) {
232 return new Response(
233 `
251
252// Client-side Rendering
253function client() {
254 createRoot(document.getElementById("root")).render(<OperationalToolDashboard />);
255}

fearlessCrimsonMolluskmain.tsx3 matches

@KGFGAMING•Updated 3 months ago
3import React, { useState } from "https://esm.sh/react@18.2.0";
4
5function App() {
6 const [hackResult, setHackResult] = useState<string | null>(null);
7 const [isLoading, setIsLoading] = useState(false);
90}
91
92function client() {
93 createnomroot(document.getElementById("non root")).render(<App />);
94}
95if (typeof document !== "undefined") { client(); }
96
97export default async function server(request: Request): Promise<Response> {
98 return new Response(
99 `

technicalFoundationStonemain.tsx3 matches

@all•Updated 3 months ago
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5function FoundationStoneGenerator() {
6 const [columnWidth, setColumnWidth] = useState(20);
7 const [numColumns, setNumColumns] = useState(3);
113}
114
115function client() {
116 createRoot(document.getElementById("root")).render(<FoundationStoneGenerator />);
117}
118if (typeof document !== "undefined") { client(); }
119
120export default async function server(request: Request): Promise<Response> {
121 return new Response(`
122 <html>

foundationmain.tsx3 matches

@all•Updated 3 months ago
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5function FoundationStoneGenerator() {
6 const [columnWidth, setColumnWidth] = useState(20);
7 const [numColumns, setNumColumns] = useState(3);
138}
139
140function client() {
141 createRoot(document.getElementById("root")).render(<FoundationStoneGenerator />);
142}
143if (typeof document !== "undefined") { client(); }
144
145export default async function server(request: Request): Promise<Response> {
146 return new Response(`
147 <html>

grayFinchmain.tsx1 match

@kingishb•Updated 3 months ago
2import { email } from "https://esm.town/v/std/email?v=11";
3
4export default async function(e: Email) {
5 if (!e.from.endsWith("<brian@sarriaking.com>")) {
6 console.error("unauthorized!", e.from);

spagUploadmain.tsx1 match

@todepond•Updated 3 months ago
2import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
3
4export default async function(req: Request): Promise<Response> {
5 let json;
6 try {

getFileEmail4 file matches

@shouser•Updated 1 week ago
A helper function to build a file's email
tuna

tuna8 file matches

@jxnblk•Updated 1 week ago
Simple functional CSS library for Val Town
webup
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.
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": "*",