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=2160&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 30411 results for "function"(3894ms)

redditAlertmain.tsx1 match

@tengis•Updated 3 months ago
12const isProd = true;
13
14export async function redditAlert({ lastRunAt }: Interval) {
15 if (!SERP_API_KEY || !DISCORD_API_KEY) {
16 console.error("Missing SERP_API_KEY or Discord webhook URL. Exiting.");

loveyoumain.tsx3 matches

@Tinygusie2•Updated 3 months ago
4import React from "https://esm.sh/react@18.2.0";
5
6function App() {
7 const draw = {
8 hidden: { pathLength: 0, opacity: 0 },
96}
97
98function client() {
99 ReactDOM.createRoot(document.getElementById("root")!).render(<App />);
100}
101if (typeof document !== "undefined") { client(); }
102
103export default async function server(request: Request): Promise<Response> {
104 return new Response(
105 `

dataAnalyticsPortfoliomain.tsx4 matches

@Sumeshbamaniya•Updated 3 months ago
61}
62
63function ThreeBackground() {
64 const mountRef = useRef<HTMLDivElement>(null);
65 const [threeError, setThreeError] = useState<string | null>(null);
123// Existing components and code remain the same...
124
125function App() {
126 return (
127 <ErrorBoundary>
134}
135
136function client() {
137 try {
138 createRoot(document.getElementById("root")!).render(<App />);
149if (typeof document !== "undefined") { client(); }
150
151export default async function server(request: Request): Promise<Response> {
152 return new Response(`
153 <html>

sqliteExplorerAppREADME.md1 match

@ianmenethil•Updated 3 months ago
33- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
34- [x] make result tables scrollable
35- [x] add export to CSV, and JSON (CSV and JSON helper functions written in [this val](https://www.val.town/v/nbbaier/sqliteExportHelpers). Thanks to @pomdtr for merging the initial version!)
36- [x] add listener for cmd+enter to submit query

replicate_starterApp.tsx1 match

@replicate•Updated 3 months ago
3import React from "https://esm.sh/react@18.2.0";
4
5function ImageGenerator() {
6 const [prompt, setPrompt] = React.useState("");
7 const [images, setImages] = React.useState<any>([]);

BraintrustSDKtutorial1 match

@tkneisly•Updated 3 months ago
3import { Eval } from "npm:braintrust";
4
5export default async function handler() {
6 const result = {
7 apiKeyStatus: null,

valentinemain.tsx3 matches

@krithik•Updated 3 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 `

Forevermain.tsx3 matches

@djay•Updated 3 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 `

MySolesamain.tsx3 matches

@dwadonjay•Updated 3 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 `

loveyoumain.tsx3 matches

@mewtru•Updated 3 months ago
4import React from "https://esm.sh/react@18.2.0";
5
6function App() {
7 const draw = {
8 hidden: { pathLength: 0, opacity: 0 },
128}
129
130function client() {
131 ReactDOM.createRoot(document.getElementById("root")!).render(<App />);
132}
133if (typeof document !== "undefined") { client(); }
134
135export default async function server(request: Request): Promise<Response> {
136 return new Response(
137 `
tuna

tuna9 file matches

@jxnblk•Updated 1 week ago
Simple functional CSS library for Val Town

getFileEmail4 file matches

@shouser•Updated 1 month 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.