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=15&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 30515 results for "function"(2749ms)

8
9// Register prompt capabilities with server
10export function registerPrompts(server: McpServer, _config: Config) {
11 // Townie prompt
12 server.prompt(
5import {getErrorMessage} from "../lib/errorUtils.ts"
6
7export function registerSqliteTools(server: McpServer, config: Config) {
8 // Execute SQL
9 server.tool(
64 )
65
66 // Fix for sqlite-query function
67 server.tool(
68 "sqlite-query",
91 )
92
93 // Fix for sqlite-exec function
94 server.tool(
95 "sqlite-exec",
6import {z} from "npm:zod"
7
8export function registerValTools(server: McpServer, config: Config) {
9 // Get val by username and val name
10 server.tool(
8import {getErrorMessage} from "../lib/errorUtils.ts";
9
10export function registerCliTools(server: McpServer, _config: Config) {
11 // Watch files in a project for real-time updates
12 server.tool(
6import {z} from "npm:zod"
7
8export function registerBranchTools(server: McpServer, config: Config) {
9 // List all branches in a val
10 server.tool(
16 * 5. Clean up workspace
17 */
18async function performFileOperationWithCli(
19 config: Config,
20 valId: string,
88}
89
90export function registerFileTools(server: McpServer, config: Config) {
91 // List files in a val branch
92 server.tool(
5import {getErrorMessage} from "../lib/errorUtils.ts"
6
7export function registerBlobTools(server: McpServer, config: Config) {
8 // List blobs
9 server.tool(
5import {getErrorMessage} from "../lib/errorUtils.ts"
6
7export function registerUserTools(server: McpServer, config: Config) {
8 // Get user information by username
9 server.tool(
5import {getCliAvailability, runVtCommand} from "../lib/vtCli.ts"
6
7export function registerProjectTools(server: McpServer, config: Config) {
8 // List all projects
9 server.tool(

Glancer_README.md1 match

@lightweight•Updated 1 day ago
1This directory has crons that extract data from Notion and save that data to blob storage in val.town. Blob storage functions like a cache.
2
3# demoCache.ts
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.