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=23&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 18794 results for "function"(796ms)

CareerCoach20DaylogEntry.ts5 matches

@prashamtrivedi•Updated 21 hours ago
51 * @returns Response with feedback
52 */
53async function handleDailyLog(content) {
54 try {
55 // Prepare log data
108 * @returns Response with status
109 */
110async function handleProgressMetrics(content) {
111 try {
112 // Prepare metrics data
147 * @returns Response with status
148 */
149async function handleTodoUpdate(content) {
150 try {
151 // Validate required fields
196}
197
198// Importing the updateTodo function here to avoid circular dependencies
199async function updateTodo(id: number, updates: any) {
200 // Build the SET part of the query dynamically based on provided updates
201 const updateFields = Object.entries(updates)

CareerCoach20Dayleads.ts4 matches

@prashamtrivedi•Updated 22 hours ago
58 * @returns Response with leads
59 */
60async function handleGetLeads(status?: string) {
61 try {
62 const leads = await getLeads(status);
84 * @returns Response with pipeline stages and counts
85 */
86async function handleGetPipeline() {
87 try {
88 const pipeline = await getLeadsPipeline();
111 * @returns Response with created lead
112 */
113async function handleCreateLead(leadData: any) {
114 try {
115 // Validate required fields
164 * @returns Response with update status
165 */
166async function handleUpdateLead(leadData: any) {
167 try {
168 // Validate required fields

CareerCoach20Daytodos.ts3 matches

@prashamtrivedi•Updated 22 hours ago
54 * @returns Response with todos
55 */
56async function handleGetTodos(status?: string) {
57 try {
58 const todos = await getTodos(status);
81 * @returns Response with created todo
82 */
83async function handleCreateTodo(todoData: any) {
84 try {
85 // Validate required fields
132 * @returns Response with update status
133 */
134async function handleUpdateTodo(todoData: any) {
135 try {
136 // Validate required fields

CareerCoach20Dayanalysis.ts9 matches

@prashamtrivedi•Updated 22 hours ago
15 * @returns Analysis object with summary, focus areas, and recommendations
16 */
17export async function generateDailyAnalysis() {
18 try {
19 // Get data from database for context
78 * @returns Analysis object with summary, victories, challenges, and strategy
79 */
80export async function generateWeeklyAnalysis() {
81 try {
82 // Get data from database for context
156 * @returns Array of task objects
157 */
158export async function generateTodaysTasks(analysis: any) {
159 try {
160 // Get additional context from database
213 * @returns Analysis and next steps
214 */
215export async function processLogEntry(content: any) {
216 try {
217 // Select the appropriate model based on content complexity
240}
241
242// Helper functions to generate system prompts
243
244function getSystemPromptForDailyAnalysis() {
245 return `
246 You are an elite career coach for a senior developer seeking contracts quickly.
274}
275
276function getSystemPromptForWeeklyAnalysis() {
277 return `
278 You are an elite career strategist for a senior developer seeking contracts quickly.
311}
312
313function getSystemPromptForTaskGeneration() {
314 return `
315 You are an AI career strategist for a senior developer seeking contracts quickly.
345}
346
347function getSystemPromptForLogProcessing() {
348 return `
349 You are an AI career coach providing immediate feedback on daily progress.

CareerCoach20DayREADME.md1 match

@prashamtrivedi•Updated 22 hours ago
30## Tech Stack
31
32- ValTown serverless functions
33- SQLite database for persistent storage
34- OpenAI API for AI-powered analysis and recommendations

sms-email-forwardmain.tsx1 match

@jflores•Updated 22 hours ago
2import process from "node:process";
3
4export default async function handler(request: Request) {
5 if (request.method !== "POST") {
6 return Response.json({ message: "This val responds to POST requests." }, {
luciaMagicLinkStarter

luciaMagicLinkStarterUserProfile.tsx1 match

@stevekrouse•Updated 22 hours ago
13}
14
15export function UserProfile({ user, onUpdate }: UserProfileProps) {
16 const [username, setUsername] = useState(user.username || "");
17 const [isEditing, setIsEditing] = useState(false);
luciaMagicLinkStarter

luciaMagicLinkStarterschema.ts1 match

@stevekrouse•Updated 22 hours ago
5export const MAGIC_LINKS_TABLE = "lucia_demo_magic_links_v2";
6
7async function createTables() {
8 await sqlite.execute(`
9 CREATE TABLE IF NOT EXISTS ${USER_TABLE} (
luciaMagicLinkStarter

luciaMagicLinkStarterLoginForm.tsx1 match

@stevekrouse•Updated 22 hours ago
6}
7
8export function LoginForm({ onError }: LoginFormProps) {
9 const [email, setEmail] = useState("");
10 const [isSubmitting, setIsSubmitting] = useState(false);

EEPMOnitoringmediaMonitoring.tsx5 matches

@solomonferede•Updated 23 hours ago
10};
11
12function MediaMonitoringTab({ user }) {
13 const [entries, setEntries] = useState([]);
14 const [platform, setPlatform] = useState("");
167 };
168
169 // Function to open the edit modal
170 const handleEditClick = (entry) => {
171 setEditingEntry(entry);
187 };
188
189 // Function to close the edit modal
190 const handleCloseEditModal = () => {
191 setIsEditModalOpen(false);
204 };
205
206 // Function to handle changes in the edit modal form
207 const handleEditFormChange = (e) => {
208 const { name, value } = e.target;
213 };
214
215 // Function to save the edited entry
216 const handleSaveEdit = async () => {
217 // Validate required fields from editFormData

getFileEmail4 file matches

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

tuna8 file matches

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