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/image-url.jpg?q=function&page=2491&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 35210 results for "function"(7166ms)

OpenTownieapi.ts1 match

@stevekrouse•Updated 4 months ago
1// Fetch project files from the backend
2export async function fetchProjectFiles(
3 { bearerToken, projectId, branchId }: { bearerToken: string; projectId: string; branchId?: string },
4) {

OpenTownieApiKeyWarning.tsx1 match

@stevekrouse•Updated 4 months ago
6}
7
8export function ApiKeyWarning({ show }: ApiKeyWarningProps) {
9 if (!show) return null;
10

tabletoprpgmain.tsx1 match

@dcm31•Updated 4 months ago
2// This val creates an HTTP-accessible SVG
3
4export default async function(req: Request) {
5 // SVG content with d20 dice pattern
6 const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 301 120" width="301" height="120">

tabletopRPG_renderermain.tsx1 match

@dcm31•Updated 4 months ago
2// This is the main SVG file that can be directly rendered in the browser
3
4export default async function(req: Request) {
5 // SVG content
6 const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 301 120" width="301" height="120">

tabletoprpg_d20_renderermain.tsx1 match

@dcm31•Updated 4 months ago
3import { tabletoprpg_d20_svg_file } from "https://esm.town/v/9319c175-2593-4f88-ba21-04f2ef7b1c28/tabletoprpg_d20_svg_file";
4
5export default async function(req: Request) {
6 // Get the SVG content
7 const svg = tabletoprpg_d20_svg_file;

tabletopRPG_d20_httpmain.tsx1 match

@dcm31•Updated 4 months ago
4import { tabletopRPG_d20 } from "https://esm.town/v/9319c175-2593-4f88-ba21-04f2ef7b1c28/tabletopRPG_d20";
5
6export default async function(req: Request) {
7 // Get the SVG content from the tabletopRPG_d20 val
8 const svg = tabletopRPG_d20;

Travelogicmain.tsx1 match

@Ms_Jaie•Updated 4 months ago
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}

svgRendererhttp.tsx1 match

@dcm31•Updated 4 months ago
2// This file serves as the main entrypoint for the SVG Renderer project
3
4export default async function(req: Request) {
5 // Parse URL to get any query parameters
6 const url = new URL(req.url);

ALX_AImain.tsx1 match

@Kofiawuah•Updated 4 months ago
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}

mynewprojectjxndotcom2 matches

@stevekrouse•Updated 4 months ago
37};
38
39async function getInitialProps(req: DataRequest, res: Response, next): Promise<Response> {
40 let params: Params = {};
41 let route: Route = Route.Home;
73}
74
75async function cacheHeaders(req: DataRequest, res: Response, next): Promise<Response> {
76 res.headers.set("Cache-Control", "max-age=31536000");
77 return next();

discordWebhook2 file matches

@stevekrouse•Updated 3 weeks ago
Helper function to send Discord messages
tuna

tuna9 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.