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/$%7Bart_info.art.src%7D?q=function&page=1933&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 22491 results for "function"(1585ms)

1// This val responds with an HTML form to input the user's name and greets them upon form submission
2
3export default async function(req: Request): Promise<Response> {
4 if (req.method === "POST") {
5 const formData = new URLSearchParams(await req.text());
1// This val responds with an HTML form to input the user's name and greets them
2
3export default async function(req: Request): Promise<Response> {
4 const htmlResponse = `
5 <form action="/" method="POST">
1// This val greets the user with their inputted name
2
3export default async function(req: Request): Promise<Response> {
4 const formData = new URLSearchParams(await req.text());
5 const name = formData.get("name") || "stranger";
1// This val responds with an HTML form to input the user's name and greet them
2
3export default async function(req: Request): Promise<Response> {
4 const htmlResponse = `
5 <form action="/" method="POST">
1// This val responds with an HTML greeting of "Hello world"
2
3export default async function(req: Request): Promise<Response> {
4 const htmlResponse = "<h1>Hello world</h1>";
5 return new Response(htmlResponse, {
1// This val will simply respond 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 will respond with a styled HTML form for users to input their name
2
3export default async function (req: Request): Promise<Response> {
4 if (req.method === "POST") {
5 const formData = new URLSearchParams(await req.text());
1// This val will respond with a simple HTML form for users to input their name
2
3export default async function (req: Request): Promise<Response> {
4 if (req.method === "POST") {
5 const formData = new URLSearchParams(await req.text());
1// This val responds with an HTML form for users to input their name and get a greeting
2
3export default async function (req: Request): Promise<Response> {
4 // Reading form data if present
5 const formData = new URLSearchParams(await req.text());
1// This val will respond with an HTML greeting to any HTTP request
2
3export default async function (req: Request): Promise<Response> {
4 return new Response(`
5 <html>

getFileEmail4 file matches

@shouser•Updated 1 month ago
A helper function to build a file's email
tuna

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