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/$1?q=function&page=24&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 28754 results for "function"(3531ms)

LiveStormMCPmcp.ts6 matches

@supagroova•Updated 1 day ago
31 * Uses a cached instance if available
32 */
33export async function setupMcpServer(): Promise<McpServer> {
34 // Return cached instance if available
35 if (mcpServerInstance) {
78 * Registers a GET endpoint as an MCP Resource
79 */
80function registerResource(
81 server: McpServer,
82 operationId: string,
165 * Registers a POST, PUT, or DELETE endpoint as an MCP Tool
166 */
167function registerTool(
168 server: McpServer,
169 operationId: string,
270 * Converts an operation ID to a name for the MCP server
271 */
272function nameFromOperationId(operationId: string): string {
273 return operationId
274 // Replace {id} with 'by ID'
307 * }
308 */
309export function createParameterSchema(operation: OperationObject): {
310 description: string;
311 inputSchema: Record<string, z.ZodTypeAny>;
332}
333
334function createZodSchema(schema: SchemaObject): z.ZodTypeAny {
335 // if the type of this schema is an object then recursively create a zod schema for each property
336 let property: z.ZodTypeAny;

LiveStormMCPlivestorm.ts4 matches

@supagroova•Updated 1 day ago
17 * Fetches the Livestorm API OpenAPI definition
18 */
19export async function fetchOpenApiSpec(): Promise<OpenApiSchema> {
20 try {
21 // Check if the OpenAPI spec is cached in Blob storage
79 * Extracts GET endpoints from the OpenAPI spec
80 */
81export function extractGetEndpoints(spec: OpenApiSchema) {
82 const getEndpoints: Record<
83 string,
101 * Extracts POST, PUT, DELETE endpoints from the OpenAPI spec
102 */
103export function extractMutationEndpoints(spec: OpenApiSchema) {
104 const mutationEndpoints: Record<
105 string,
150 * Proxies a request to the Livestorm API
151 */
152export async function proxyRequest(
153 path: string,
154 method: string,
getUpdateAvailability

getUpdateAvailabilitymain.tsx1 match

@gaimeri17•Updated 1 day ago
1export default async function server(request: Request): Promise<Response> {
2 // Get the HTTP method
3 const method = request.method.toUpperCase();

Emailmain.tsx1 match

@greg_dryke•Updated 1 day ago
1export default async function (e: Email) {
2
3}

thirdTimerActionButtons.tsx1 match

@nbbaier•Updated 1 day ago
12}
13
14export function ActionButtons({
15 state,
16 onStartWork,

thirdTimercn.ts1 match

@nbbaier•Updated 1 day ago
2import { twMerge } from "https://esm.sh/tailwind-merge@3.0.1";
3
4export function cn(...inputs: ClassValue[]) {
5 return twMerge(clsx(inputs));
6}

untitled-3016ChatRoom.tsx1 match

@Mouhak•Updated 1 day ago
3import type { ChatMessage, ApiResponse } from "../../shared/types.ts";
4
5export default function ChatRoom() {
6 const [messages, setMessages] = useState<ChatMessage[]>([]);
7 const [newMessage, setNewMessage] = useState('');

untitled-3016JobForm.tsx1 match

@Mouhak•Updated 1 day ago
7}
8
9export default function JobForm({ onJobCreated }: JobFormProps) {
10 const [formData, setFormData] = useState({
11 title: '',

untitled-3016JobBoard.tsx1 match

@Mouhak•Updated 1 day ago
4import JobForm from "./JobForm.tsx";
5
6export default function JobBoard() {
7 const [jobs, setJobs] = useState<Job[]>([]);
8 const [loading, setLoading] = useState(true);

untitled-3016App.tsx1 match

@Mouhak•Updated 1 day ago
6type Tab = 'jobs' | 'chat';
7
8export default function App() {
9 const [activeTab, setActiveTab] = useState<Tab>('jobs');
10

getFileEmail4 file matches

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

tuna8 file matches

@jxnblk•Updated 1 month 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.