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%22Image%20title%22?q=function&page=98&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 20320 results for "function"(1939ms)

automate-workflowsREADME.md1 match

@charmaine•Updated 2 days ago
12- Form for entering repository details and commit range
13- Preview of generated release notes in Markdown format
14- Copy to clipboard functionality
15- Download as Markdown file
16- Error handling and loading states

automate-workflowsindex.js1 match

@charmaine•Updated 2 days ago
16});
17
18function setupFormHandling() {
19 const form = document.getElementById('release-form');
20 const generateBtn = document.getElementById('generate-btn');

automate-workflowsutils.ts4 matches

@charmaine•Updated 2 days ago
3// Parse a commit message according to conventional commit format
4// https://www.conventionalcommits.org/
5export function parseCommitMessage(commit: GitHubCommit): { type: CommitType; message: string } {
6 const { message } = commit.commit;
7
26
27// Group commits by type for release notes
28export function groupCommitsByType(commits: GitHubCommit[]): ReleaseNoteSection[] {
29 const sections: Record<CommitType, ReleaseNoteItem[]> = {} as Record<CommitType, ReleaseNoteItem[]>;
30
56
57// Generate markdown for release notes
58export function generateMarkdown(title: string, date: string, sections: ReleaseNoteSection[]): string {
59 let markdown = `# ${title}\n\n`;
60 markdown += `*Released on ${date}*\n\n`;
74
75// Format date to YYYY-MM-DD
76export function formatDate(date: Date): string {
77 return date.toISOString().split('T')[0];
78}

Towniestyles.css2 matches

@valdottown•Updated 2 days ago
162 transition-property: background-color;
163 transition-duration: 400ms;
164 transition-timing-function: linear;
165}
166
840 transition-property: color, background-color, border-color, opacity;
841 transition-duration: 200ms;
842 transition-timing-function: ease-in-out;
843}
844

automate-workflowsmain.tsx1 match

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

Testwebsiteindex.ts4 matches

@charmaine•Updated 2 days ago
1export default async function (req: Request) {
2 const html = `<!DOCTYPE html>
3<html lang="en">
381
382 <script>
383 // Simple scroll to section functionality
384 document.querySelectorAll('a[href^="#"]').forEach(anchor => {
385 anchor.addEventListener('click', function (e) {
386 e.preventDefault();
387
392 });
393
394 // Mobile menu toggle functionality could be added here
395 </script>
396</body>

stevensDemoqueries.ts4 matches

@Fewl•Updated 2 days ago
6const tableName = "memories";
7
8export async function getAllMemories(): Promise<Memory[]> {
9 const result = await sqlite.execute(
10 `SELECT id, date, text, createdBy, createdDate, tags FROM ${tableName}
23}
24
25export async function createMemory(
26 memory: Omit<Memory, "id">,
27): Promise<Memory> {
51}
52
53export async function updateMemory(
54 id: string,
55 memory: Partial<Omit<Memory, "id">>,
70}
71
72export async function deleteMemory(id: string): Promise<void> {
73 await sqlite.execute(`DELETE FROM ${tableName} WHERE id = ?`, [id]);
74}

stevensDemopopulateDemo.ts5 matches

@Fewl•Updated 2 days ago
5
6// Create the memories_demo table
7async function createMemoriesDemoTable() {
8 try {
9 await sqlite.execute(`
25
26// Create a fake memory with proper ID and timestamps
27function createMemory(date, text, createdBy, tags, createdDateOffset = 0) {
28 const id = nanoid(10);
29 // Base date is April 5, 2025
375
376// Insert memories into the database
377async function insertDemoMemories() {
378 try {
379 // Clear existing data if any
406}
407
408// Main function to populate demo data
409export default async function populateDemo() {
410 try {
411 // Create the table

TestwebsiteREADME.md2 matches

@charmaine•Updated 2 days ago
343. Update the product offerings and pricing
354. Modify the color scheme by changing the Tailwind color classes (currently using pink-600 as the primary color)
365. Add functionality to the contact form and shopping cart buttons
37
38## Future Enhancements
39
40- Add a shopping cart functionality
41- Implement a product filtering system
42- Add a blog section for flower care tips

stevensDemosetupTelegramChatDb.ts1 match

@Fewl•Updated 2 days ago
2// Run this script manually to create the database table
3
4export default async function setupTelegramChatDb() {
5 try {
6 // Import SQLite module

getFileEmail4 file matches

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