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/?q=function&page=2599&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 29176 results for "function"(8440ms)

1// This val will respond to any request with an HTML "Hello, world!" message styled with fun CSS
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
2export default async function(req: Request): Promise<Response> {
3 return new Response("<h1>Hello, world!</h1>", { headers: { "Content-Type": "text/html" } });
4}
1// This val will respond to any request with "Hello, world!"
2export default async function(req: Request): Promise<Response> {
3 return new Response("Hello, world!", { headers: { "Content-Type": "text/plain" } });
4}
29 let direction = 1;
30
31 // Function to move the cat around the screen
32 function moveCat() {
33 if (x >= window.innerWidth - 100) {
34 direction = -1;
9const sparklineData = [5, 10, 5, 20, 15, 30, 25];
10
11export default function handler() {
12 const svg = sparklineSVG({ data: sparklineData });
13
5import { sparklineSVG } from "https://esm.town/v/stevekrouse/sparklineSVG";
6
7export default async function (req: Request): Promise<Response> {
8 const data = [5, 3, 9, 6, 5, 9, 7, 3, 5, 2, 6]; // Sample data for the sparkline
9
4// Comment: Crafting a streamlined server with Hono that sends back SVG sparkline and a playful animated cat goofing around
5
6export default async function() {
7 const sparkline = sparklineSVG([5, 10, 5, 20, 15, 10, 15, 20, 25, 30]);
8
4import { sparklineSVG } from "https://esm.town/v/stevekrouse/sparklineSVG";
5
6export default async function(req: Request): Promise<Response> {
7 const data = [5, 10, 5, 20, 8, 15]; // Example data for the sparkline
8 const svg = sparklineSVG(data, { width: 100, height: 20 });
7 */
8
9export default async function(req: Request): Promise<Response> {
10 const htmlContent = `
11 <!DOCTYPE html>
7 */
8
9export default async function(req: Request): Promise<Response> {
10 const catGifURL = "https://media.giphy.com/media/JIX9t2j0ZTN9S/giphy.gif";
11 const htmlContent = `
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.