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=2133&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 24511 results for "function"(4999ms)

2// When the form is submitted, it greets you with "Hello, <name>!".
3
4export default async function(req: Request): Promise<Response> {
5 let name = "";
6 if (req.method === "POST") {
4// Modified to make the page styling more vibrant and eye-catching.
5
6export default async function(req: Request): Promise<Response> {
7 let name = "";
8 if (req.method === "POST") {
1// This val serves an HTML page with a vibrant and eye-catching design for a greeting form.
2
3export default async function(req: Request): Promise<Response> {
4 const decoder = new TextDecoder();
5 const formData = new URLSearchParams(decoder.decode(await req.arrayBuffer()));
2// We'll enhance the UI with a modern pop effect for the greeting message.
3
4export default async function(req: Request): Promise<Response> {
5 const html = `
6 <!DOCTYPE html>
60 <div id="greetingMessage" style="display:none;"></div>
61 <script>
62 document.getElementById("greetingForm").addEventListener("submit", async function(e) {
63 e.preventDefault();
64 const formData = new FormData(this);
2// When the form is submitted, it greets you with "Hello, <name>!".
3
4export default async function(req: Request): Promise<Response> {
5 let name = "";
6 if (req.method === "POST") {
2// We'll embed the CSS directly in the HTML for simplicity.
3
4export default async function(req: Request): Promise<Response> {
5 const html = `
6 <!DOCTYPE html>
2// We'll handle the form submission using a POST request.
3
4export default async function(req: Request): Promise<Response> {
5 const html = `
6 <!DOCTYPE html>
1// This val serves an HTML page with an input field to enter a name and greets the user when the form is submitted.
2
3export default async function(req: Request): Promise<Response> {
4 const decoder = new TextDecoder();
5 const formData = new URLSearchParams(decoder.decode(await req.arrayBuffer()));
3
4/**
5 * This function handles incoming HTTP requests and returns a styled HTML response.
6 */
7export default function(req: Request): Response {
8 // The CSS styles we will apply
9 const css = `
1// This Val will respond with a simple "Hello World" message styled with CSS
2
3export default function(req: Request): Response {
4 // Define the HTML content with a styled message
5 const htmlContent = `

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.