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/$%7Bsuccess?q=function&page=1&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 18011 results for "function"(1104ms)

yolomain.tsx1 match

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

x-cache-bugserver.ts1 match

@hacksoreUpdated 1 hour ago
1export default function server(request: Request): Response {
2 // Define the redirect targets
3 const SPECIAL_REDIRECT_TARGET = "https://apple.com/apple-events";

pondiverseupdateTable1 match

@argmnUpdated 2 hours ago
2
3export const TABLE_NAME = "pondiverse_creations_v4";
4export default async function(req: Request): Promise<Response> {
5 await sqlite.execute(
6 `CREATE TABLE IF NOT EXISTS ${TABLE_NAME} (

pondiversemain1 match

@argmnUpdated 2 hours ago
6import updateTable from "./updateTable";
7
8export default async function(req: Request): Promise<Response> {
9 let url = new URL(req.url);
10 const path = url.pathname.toLowerCase();

pondiversegetCreations1 match

@argmnUpdated 2 hours ago
3import { TABLE_NAME } from "./updateTable";
4
5export default async function(req: Request): Promise<Response> {
6 // First, get the row IDs of all rows that are older than 25 hours old
7 const res = await sqlite.execute(`

pondiversegetCreationImage1 match

@argmnUpdated 2 hours ago
3import { TABLE_NAME } from "./updateTable";
4
5export default async function(req: Request): Promise<Response> {
6 const url = new URL(req.url);
7 const id = url.searchParams.get("id");

pondiversegetCreation1 match

@argmnUpdated 2 hours ago
3import { TABLE_NAME } from "./updateTable";
4
5export default async function(req: Request): Promise<Response> {
6 const url = new URL(req.url);
7 const id = url.searchParams.get("id");

pondiversedeleteCreation1 match

@argmnUpdated 2 hours ago
4import { TABLE_NAME } from "./updateTable";
5
6export default async function(req: Request): Promise<Response> {
7 // body contains:
8 // - id (number)

pondiverseaddCreation1 match

@argmnUpdated 2 hours ago
4import { TABLE_NAME } from "./updateTable";
5
6export default async function(req: Request): Promise<Response> {
7 // body contains:
8 // - title (string)

untitled-9414main.tsx3 matches

@bernardoUpdated 2 hours ago
13const webhookIdToDelete = "51a2064a0098b4feacadfd7db51f6a21"; // ← Change this
14
15async function listWebhooks(apiKey: string, propertyId: string): Promise<CloudbedsWebhook[]> {
16 const res = await fetch(`https://hotels.cloudbeds.com/api/v1.2/getWebhooks?propertyID=${propertyId}`, {
17 headers: { Authorization: `Bearer ${apiKey}` },
29}
30
31async function deleteWebhookById(apiKey: string, id: string, url: string, object: string, action: string) {
32 const body = new URLSearchParams({
33 subscriptionID: id,
52}
53
54export default async function() {
55 const user = await blob.getJSON(`cloudbeds_user_${userId}`);
56 const apiKey = user?.cloudbedsAccounts?.[propertyId]?.apiKey;

getFileEmail4 file matches

@shouserUpdated 1 week ago
A helper function to build a file's email
tuna

tuna8 file matches

@jxnblkUpdated 2 weeks ago
Simple functional CSS library for Val Town
webup
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.
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": "*",