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=51&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 30873 results for "function"(1498ms)

cardamonApp.tsx1 match

@connnolly•Updated 3 days ago
16}
17
18export default function App() {
19 const [state, setState] = useState<AppState>({
20 view: 'list',

cardamonmigrations.ts1 match

@connnolly•Updated 3 days ago
4const INGREDIENTS_TABLE = 'ingredients_v1';
5
6export async function runMigrations() {
7 console.log('Running database migrations...');
8

zerto-lifecycle-matrixmain.tsx1 match

@captn3m0•Updated 3 days ago
1export default async function (req: Request): Promise<Response> {
2 try {
3 const response = await fetch("https://help-be.zerto.com/api/bundle/Lifecycle.Matrix.HTML/page/product_version_lifecycle_matrix_for_zerto.html");

forward-emails-to-ntfyrailway.ts1 match

@faekiva•Updated 3 days ago
1import { ntfy } from "https://esm.town/v/xkonti/ntfy@v32";
2
3export async function emailValHandler(email: Email) {
4 ntfy
5 .console.log("Email received!", email.from, email.subject, email.text);

invest-trackerstyle_static.tsx1 match

@samxii777•Updated 3 days ago
118
119/* ---------- HTTP response ---------- */
120export default function() {
121 return new Response(css, {
122 headers: { "content-type": "text/css; charset=utf-8" },

beeminder-apimain.tsx3 matches

@cricks_unmixed4u•Updated 3 days ago
44}
45
46export async function addBeeminderDatapoint(
47 datapoint: BeeminderDatapoint,
48 token?: string,
94}
95
96export async function adjustBeeminderGoalRate(
97 goalSlug: string,
98 newRate: number,
161}
162
163export default async function(req: Request): Promise<Response> {
164 const url = new URL(req.url);
165 const path = url.pathname;

gissue-rolodexApp.tsx2 matches

@cricks_unmixed4u•Updated 3 days ago
2import { useState } from "https://esm.sh/react@18.2.0";
3
4console.log("useState", typeof useState); // should be 'function'
5
6
7export default function App(): React.JSX.Element {
8 const [refreshFrequency, setRefreshFrequency] = useState("");
9 const [isSubmitting, setIsSubmitting] = useState(false);

mcp-starterREADME.md1 match

@nbbaier•Updated 3 days ago
31
32The MCP TypeScript SDK uses Node-specific APIs that don't play nicely with Deno
33or edge functions:
34
35- https://github.com/modelcontextprotocol/typescript-sdk/issues/260

untitled-8413index.html1 match

@chadparker•Updated 3 days ago
37 import { createRoot } from 'https://esm.sh/react-dom@18.2.0/client';
38
39 function App() {
40 const [vals, setVals] = useState([]);
41 const [loading, setLoading] = useState(true);

GlancerblobKeyForDemoCache.ts1 match

@lightweight•Updated 3 days ago
1export async function blobKeyForDemoCache(id: string) {
2 // get the url of this file
3 // we'll use this to get values for the blob key
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.