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%20%22Optional%20title%22?q=function&page=2110&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 31265 results for "function"(10490ms)

responsibleAquaGuanmain.tsx1 match

@maxm•Updated 2 months ago
1import { greeting } from "https://esm.town/v/maxm/rousingCrimsonMonkey";
2export default async function(req: Request): Promise<Response> {
3 return Response.json({ greeting });
4}

personaltrainingmain.tsx7 matches

@OgagaOnuta•Updated 2 months ago
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5function Logo({ theme }) {
6 return (
7 <div className="app-logo">
19}
20
21function ClientProfileForm({ onSubmit }) {
22 const [profile, setProfile] = useState({
23 name: '',
101}
102
103function WorkoutPlanForm({ clients, onSubmit }) {
104 const [workoutPlan, setWorkoutPlan] = useState({
105 clientId: '',
223}
224
225function ProgressTracker() {
226 const [progressEntries, setProgressEntries] = useState([]);
227 const [newEntry, setNewEntry] = useState({
332}
333
334function App() {
335 const [clients, setClients] = useState([]);
336 const [refreshClients, setRefreshClients] = useState(0);
420}
421
422function client() {
423 createRoot(document.getElementById("root")).render(<App />);
424}
428}
429
430export default async function server(request: Request): Promise<Response> {
431 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
432 const KEY = "personaltraining";

OpenTownieuseProjectFiles.ts1 match

@stevekrouse•Updated 2 months ago
17 * Custom hook to fetch and manage project files
18 */
19export function useProjectFiles({
20 projectId,
21 branchId,

OpenTownieuseChatLogic.ts1 match

@stevekrouse•Updated 2 months ago
13}
14
15export function useChatLogic({
16 project,
17 branchId,

OpenTownieProjectFiles.tsx1 match

@stevekrouse•Updated 2 months ago
11}
12
13export function ProjectFiles({
14 projectFiles,
15 isLoadingFiles,

OpenTownieMessageItem.tsx1 match

@stevekrouse•Updated 2 months ago
24}
25
26export function MessageItem({ message, usages, messageEndTimes, running }: MessageItemProps) {
27 return (
28 <div

OpenTownieErrorDisplay.tsx1 match

@stevekrouse•Updated 2 months ago
6}
7
8export function ErrorDisplay({ error }: ErrorDisplayProps) {
9 if (!error) return null;
10

OpenTownieChatMessages.tsx1 match

@stevekrouse•Updated 2 months ago
12}
13
14export function ChatMessages({
15 messages,
16 usages,

OpenTownieChatHeader.tsx1 match

@stevekrouse•Updated 2 months ago
17}
18
19export function ChatHeader({
20 project,
21 bearerToken,

OpenTownieapi.ts1 match

@stevekrouse•Updated 2 months ago
1// Fetch project files from the backend
2export async function fetchProjectFiles(
3 { bearerToken, projectId, branchId }: { bearerToken: string; projectId: string; branchId?: string },
4) {
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.