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//%22?q=function&page=9&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 40465 results for "function"(761ms)

transit-proxymain.ts1 match

@easrng•Updated 1 day ago
1export default async function (req: Request): Promise<Response> {
2 if (req.method !== "GET") {
3 return new Response("Method Not Allowed", { status: 405 });

sheets-notificationsendpoint.ts1 match

@nbbaier•Updated 1 day ago
1// Learn more: https://docs.val.town/vals/http/
2export default async function (req: Request): Promise<Response> {
3 if (req.method === "POST") {
4 try {

untitled-5100main.ts1 match

@chatgot•Updated 1 day ago
1export default async function (req: Request): Promise<Response> {
2 const url = new URL(req.url);
3 const mode = url.searchParams.get("mode") || "scoreboard";
5} from "../services/notion/index.ts";
6
7export async function glimpseLoginHandler(c: Context) {
8 // Extract user email from context (set by authCheck middleware)
9 const userEmail = c.get("userEmail");
186}
187
188export async function glimpseThanksHandler(c: Context) {
189 // Extract user email from context (set by authCheck middleware)
190 const userEmail = c.get("userEmail");

guesty2homeitmain.ts1 match

@bernardo•Updated 1 day ago
4 "https://script.google.com/macros/s/AKfycbztFlFnno3h8cQPd-539fZiH--458uc3tJOgykLmE37bqSKT09NodHmvNffruwpTInjUQ/exec";
5
6export default async function handler(req: Request): Promise<Response> {
7 if (req.method !== "POST") {
8 return new Response("Only POST supported", { status: 405 });

boychick-statusmain.ts1 match

@kellyi•Updated 1 day ago
1// Learn more: https://docs.val.town/vals/http/
2export default async function (req: Request): Promise<Response> {
3 return Response.json({ ok: true })
4}

webgpu_2server.tsx1 match

@saolsen•Updated 1 day ago
1import module_path from "./module_path.tsx"
2
3export default function (_req: Request): Response {
4 return new Response(
5 `

webgpu_1server.tsx1 match

@saolsen•Updated 1 day ago
1import module_path from "./module_path.tsx"
2
3export default function (_req: Request): Response {
4 return new Response(
5 `

webgpu_1main.tsx3 matches

@saolsen•Updated 1 day ago
3import module_path from "./module_path.tsx"
4
5async function main() {
6 const shader = await (await fetch(`${module_path}/shader.wgsl`)).text();
7
51 };
52
53 function render() {
54 renderPassDescriptor.colorAttachments[0].view =
55 context.getCurrentTexture().createView();
85}
86
87function fail(msg: string) {
88 alert(msg);
89}

betterstackmain.tsx1 match

@vov•Updated 1 day ago
5const BS_TOKEN = "RHDjqigndRmG7EqaqUQV1fZK";
6
7export default async function (interval: Interval) {
8 const ONE_DAY_MS = 24 * 60 * 60 * 1000;
9 const HEADERS = {

ratelimit4 file matches

@unkey•Updated 1 month ago
Rate limit your serverless functions

discordWebhook2 file matches

@stevekrouse•Updated 2 months ago
Helper function to send Discord messages
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.