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=1463&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 19200 results for "function"(1135ms)

cerebras_debatermain.tsx3 matches

@stevekrouse•Updated 6 months ago
16];
17
18function App() {
19 const [personality1, setPersonality1] = useState("an emacs enthusiast");
20 const [personality2, setPersonality2] = useState("a vim enthusiast");
205}
206
207function client() {
208 createRoot(document.getElementById("root")).render(<App />);
209}
213}
214
215export default async function server(req: Request): Promise<Response> {
216 const url = new URL(req.url);
217

intellectualMaroonMockingbirdmain.tsx5 matches

@stevekrouse•Updated 6 months ago
6import { tomorrow } from "https://esm.sh/react-syntax-highlighter/dist/esm/styles/prism";
7
8function App() {
9 const [prompt, setPrompt] = useState("hello llamapalooza");
10 const [code, setCode] = useState("");
20 >(null);
21
22 async function handleSubmit(e: React.FormEvent) {
23 e.preventDefault();
24 setLoading(true);
131}
132
133function client() {
134 createRoot(document.getElementById("root")!).render(<App />);
135}
139}
140
141function extractCodeFromFence(text: string): string {
142 const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
143 return htmlMatch ? htmlMatch[1].trim() : text;
144}
145
146export default async function server(req: Request): Promise<Response> {
147 if (req.method === "POST") {
148 const client = new Cerebras();

intellectualMaroonMockingbirdmain.tsx5 matches

@stevekrouse•Updated 6 months ago
6import { tomorrow } from "https://esm.sh/react-syntax-highlighter/dist/esm/styles/prism";
7
8function App() {
9 const [prompt, setPrompt] = useState("hello llamapalooza");
10 const [code, setCode] = useState("");
20 >(null);
21
22 async function handleSubmit(e: React.FormEvent) {
23 e.preventDefault();
24 setLoading(true);
131}
132
133function client() {
134 createRoot(document.getElementById("root")!).render(<App />);
135}
139}
140
141function extractCodeFromFence(text: string): string {
142 const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
143 return htmlMatch ? htmlMatch[1].trim() : text;
144}
145
146export default async function server(req: Request): Promise<Response> {
147 if (req.method === "POST") {
148 const client = new Cerebras();

truthfulAmethystParakeetmain.tsx5 matches

@stevekrouse•Updated 6 months ago
6import { tomorrow } from "https://esm.sh/react-syntax-highlighter/dist/esm/styles/prism";
7
8function App() {
9 const [prompt, setPrompt] = useState("hello llamapalooza");
10 const [code, setCode] = useState("");
20 >(null);
21
22 async function handleSubmit(e: React.FormEvent) {
23 e.preventDefault();
24 setLoading(true);
123}
124
125function client() {
126 createRoot(document.getElementById("root")!).render(<App />);
127}
131}
132
133function extractCodeFromFence(text: string): string {
134 const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
135 return htmlMatch ? htmlMatch[1].trim() : text;
136}
137
138export default async function server(req: Request): Promise<Response> {
139 if (req.method === "POST") {
140 const client = new Cerebras();

truthfulAmethystParakeetmain.tsx5 matches

@stevekrouse•Updated 6 months ago
6import { tomorrow } from "https://esm.sh/react-syntax-highlighter/dist/esm/styles/prism";
7
8function App() {
9 const [prompt, setPrompt] = useState("hello llamapalooza");
10 const [code, setCode] = useState("");
20 >(null);
21
22 async function handleSubmit(e: React.FormEvent) {
23 e.preventDefault();
24 setLoading(true);
123}
124
125function client() {
126 createRoot(document.getElementById("root")!).render(<App />);
127}
131}
132
133function extractCodeFromFence(text: string): string {
134 const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
135 return htmlMatch ? htmlMatch[1].trim() : text;
136}
137
138export default async function server(req: Request): Promise<Response> {
139 if (req.method === "POST") {
140 const client = new Cerebras();

southcloudmain.tsx2 matches

@temptemp•Updated 6 months ago
6const dataChart: { variable: string; value: number }[][] = [];
7
8function getValueOf(text: string): number {
9 const pattern = new RegExp(`,${text}=0x([a-zA-Z0-9]+)`, "g");
10 const match = pattern.exec(str);
34 }
35};
36export function base(p) {
37 let key = "";
38 let encryptedText = p;

retiredRedMarlinmain.tsx2 matches

@temptemp•Updated 6 months ago
1import { base } from "https://esm.town/v/tempguy/southcloud";
2
3async function fetchStreamLink() {
4 try {
5 const headers = {
48}
49
50// Call the function
51fetchStreamLink();

basemain.tsx2 matches

@temptemp•Updated 6 months ago
6const dataChart: { variable: string; value: number }[][] = [];
7
8function getValueOf(text: string): number {
9 const pattern = new RegExp(`,${text}=0x([a-zA-Z0-9]+)`, "g");
10 const match = pattern.exec(str);
34 }
35};
36export function base(p) {
37 let key = "";
38 let encryptedText = p;

ViewCountermain.tsx1 match

@youhavetrouble•Updated 6 months ago
2import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
3
4export default async function(req: Request): Promise<Response> {
5 if (req.method !== "GET") {
6 return new Response("Method not allowed", {

welcomingSapphireRoundwormmain.tsx3 matches

@stevekrouse•Updated 6 months ago
3import { createRoot } from "https://esm.sh/react-dom/client";
4
5function App() {
6 const [query, setQuery] = useState("");
7 const [searchLoading, setSearchLoading] = useState(false);
109}
110
111function client() {
112 createRoot(document.getElementById("root")).render(<App />);
113}
117}
118
119export default async function server(req: Request): Promise<Response> {
120 if (req.method === "POST") {
121 const url = new URL(req.url);

getFileEmail4 file matches

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

tuna8 file matches

@jxnblk•Updated 3 weeks 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": "*",