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=1611&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 19320 results for "function"(3061ms)

1// This val will respond with a "Hello World" HTML page styled with fun CSS
2
3export default async function(req: Request): Promise<Response> {
4 // CSS styles to make the text colorful and centered
5 const cssStyles = `<style>h1 { color: purple; text-align: center; }</style>`;
1// This val will respond with a simple "Hello World" HTML page with fun CSS styling
2
3export default async function(req: Request): Promise<Response> {
4 // HTML content with CSS styling
5 const htmlContent = `
1// This val will respond with a simple "Hello World" HTML page with fun CSS
2
3export default async function(req: Request): Promise<Response> {
4 // HTML content with style tag for fun CSS
5 const htmlContent = `
1// This val will respond with a simple "Hello World" HTML page
2
3export default async function(req: Request): Promise<Response> {
4 // HTML content to be sent in the response
5 const htmlContent = `<html><body><h1>Hello World!</h1></body></html>`;
5import parserBabel from "npm:prettier/parser-babel";
6
7export default async function(req: Request): Promise<Response> {
8 try {
9 // Ensure the request contains valid JSON data
6import parserBabel from "npm:prettier/parser-babel";
7
8export default async function(req: Request): Promise<Response> {
9 const { code } = await req.json();
10
1// This val will respond to any request with an HTML "Hello, world!" message with some fun CSS styles and an animated cat
2export default async function(req: Request): Promise<Response> {
3 const html = `
4 <html>
1export default async function(req: Request): Promise<Response> {
2 const html = `
3 <html>
1// This val will respond to any request with an HTML "Hello, world!" message with some fun CSS styles and an animated cat
2export default async function(req: Request): Promise<Response> {
3 const html = `
4 <html>
1// This val will respond to any request with an HTML "Hello, world!" message with some fun CSS styles and an animated cat
2export default async function(req: Request): Promise<Response> {
3 const html = `
4 <html>

getFileEmail4 file matches

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

tuna8 file matches

@jxnblk•Updated 3 weeks 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.