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%20%22Image%20title%22?q=function&page=2573&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 29109 results for "function"(1947ms)

1// This HTTP val responds to all requests with "Hello world"
2
3export default async function main(req: Request): Promise<Response> {
4 return new Response("Hello world", { headers: { "Content-Type": "text/plain" } });
5}
1// This val responds with "Hello world" to all incoming requests
2
3export default async function (req: Request): Promise<Response> {
4 return new Response("Hello world");
5}
1// This val responds to HTTP requests with a colorful HTML message using gradients
2export default async function main(req: Request): Promise<Response> {
3 const html = `
4 <html>
1// This val responds to HTTP requests with an HTML page displaying "Hello, world!" with a crazy gradient background
2
3export default async function main(req: Request): Promise<Response> {
4 const html = `
5 <!DOCTYPE html>
1// This val responds to HTTP requests with an HTML page containing a colorful gradient background
2export default async function main(req: Request): Promise<Response> {
3 const html = `
4 <html>
1// This val responds to HTTP requests with "Hello, world!"
2export default async function main(req: Request): Promise<Response> {
3 return new Response("Hello, world!", { headers: { "Content-Type": "text/plain" } });
4}
1// This val responds with "Hello, World!" to all incoming requests
2
3export default async function main(req: Request): Promise<Response> {
4 return new Response("Hello, World!");
5}
1// This val will simply respond with "Hello, World!" to any incoming HTTP request.
2
3export default async function main(req: Request): Promise<Response> {
4 return new Response("Hello, World!");
5}
1// This val responds with "Hello, World!" to all incoming HTTP requests.
2
3export default async function main(req: Request): Promise<Response> {
4 return new Response("Hello, World!");
5}
1// This val will respond to HTTP requests with "Hello, World!"
2export default async function (req: Request): Promise<Response> {
3 return new Response("Hello, World!", { headers: { "Content-Type": "text/plain" } });
4}
tuna

tuna9 file matches

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