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=1012&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 17289 results for "function"(1729ms)

status_status

status_statusaws-proxy3 matches

@maxm•Updated 2 months ago
159</html>`;
160
161async function fetchFeed(url: string) {
162 const response = await fetch(url);
163 const xml = await response.text();
169}
170
171function generateStatusHTML(feeds: any[]) {
172 const allItems = feeds.flatMap(feed => feed.items);
173 const hasIssues = allItems.length > 0;
212}
213
214export default async function handler(req: Request): Promise<Response> {
215 const feedResults = await Promise.all(FEEDS.map(fetchFeed));
216 const content = generateStatusHTML(feedResults);

status_statusstatus1 match

@charmaine•Updated 2 months ago
1export default async function(req: Request): Promise<Response> {
2 return new Response(
3 `

status_statusaws-proxy3 matches

@charmaine•Updated 2 months ago
158</html>`;
159
160async function fetchFeed(url: string) {
161 try {
162 const response = await fetch(url);
177}
178
179function generateStatusHTML(feeds: any[]) {
180 const allItems = feeds.flatMap(feed => feed.items);
181 const hasIssues = allItems.length > 0;
220}
221
222export default async function handler(req: Request): Promise<Response> {
223 const feedResults = await Promise.all(FEEDS.map(fetchFeed));
224 const content = generateStatusHTML(feedResults);

boliviadigestrssmain.tsx1 match

@joseforonda•Updated 2 months ago
3import { dataToRSS } from "https://esm.town/v/stevekrouse/dataToRSS";
4
5export default async function(req: Request): Promise<Response> {
6 const key = "boliviadigest";
7 const subject = "Bolivia Digest";

ikeaSecondChanceOffersmain.tsx1 match

@stevekrouse•Updated 2 months ago
5const stores = [117, 187, 226];
6
7export default async function(interval: Interval) {
8 const itemBaseUrl =
9 `https://www.ikea.com/${locale}/customer-service/services/buy-back/zweite-chance-markt-online-pub67d33610`;

selarAppmain.tsx3 matches

@stevekrouse•Updated 2 months ago
3import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
4
5function App() {
6 const [leads, setLeads] = useState([]);
7 const [newLead, setNewLead] = useState({
158};
159
160function client() {
161 createRoot(document.getElementById("root")).render(<App />);
162}
163if (typeof document !== "undefined") { client(); }
164
165export default async function server(request: Request): Promise<Response> {
166 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
167 const KEY = "selarApp";

calculatorAppmain.tsx3 matches

@Scoder•Updated 2 months ago
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5function MediaPreparationCalculator() {
6 const [mediaType, setMediaType] = useState('nutrient_agar');
7 const [totalVolume, setTotalVolume] = useState(1000);
219}
220
221function client() {
222 createRoot(document.getElementById("root")).render(<MediaPreparationCalculator />);
223}
224if (typeof document !== "undefined") { client(); }
225
226export default async function server(request: Request): Promise<Response> {
227 return new Response(`
228 <html>

admirableWhiteBirdmain.tsx3 matches

@Tanveer•Updated 2 months ago
3import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
4
5function App() {
6 const [messages, setMessages] = useState([
7 {
101}
102
103function client() {
104 createRoot(document.getElementById("root")).render(<App />);
105}
106if (typeof document !== "undefined") { client(); }
107
108export default async function server(request: Request): Promise<Response> {
109 if (request.method === "POST" && new URL(request.url).pathname === "/chat") {
110 const { OpenAI } = await import("https://esm.town/v/std/openai");

caringCoralMoosemain.tsx3 matches

@Tanveer•Updated 2 months ago
3import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
4
5function App() {
6 const [messages, setMessages] = useState([
7 {
101}
102
103function client() {
104 createRoot(document.getElementById("root")).render(<App />);
105}
106if (typeof document !== "undefined") { client(); }
107
108export default async function server(request: Request): Promise<Response> {
109 if (request.method === "POST" && new URL(request.url).pathname === "/chat") {
110 const { OpenAI } = await import("https://esm.town/v/std/openai");

thrillingAmberSalmonappealingMagentaScallop1 match

@sidtrip•Updated 2 months ago
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}

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": "*",