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%22Optional%20title%22?q=function&page=1746&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 20677 results for "function"(3251ms)

57 let attempts = 0;
58
59 function submitWord() {
60 const input = document.getElementById('word-input').value.toUpperCase();
61 if (input.length !== 5) {
7 */
8
9export default async function(req: Request): Promise<Response> {
10 const htmlContent = `
11<!DOCTYPE html>
85 document.addEventListener('keydown', handleKeydown);
86
87 function handleKeydown(event) {
88 const key = event.key.toUpperCase();
89 if (key >= 'A' && key <= 'Z' && currentCol < 5) {
98 }
99
100 function checkGuess() {
101 const guess = [];
102 for (let i = 0; i < 5; i++) {
125 }
126
127 function markCell(i, color) {
128 document.getElementById(\`cell-\${currentRow}-\${i}\`).classList.add(color);
129 }
130
131 function showMessage(message, color) {
132 const messageElem = document.getElementById("message");
133 messageElem.innerText = message;
136 }
137
138 function restartGame() {
139 window.location.reload();
140 }
1// This val will respond with a fun "Hello World" HTML page with crazy CSS styling
2
3export default async function(req: Request): Promise<Response> {
4 // CSS styles for the HTML page
5 const cssStyles = `
1// This val will respond with a colorful "Hello World" HTML page with fun CSS
2
3export default async function(req: Request): Promise<Response> {
4 // CSS styles for the Hello World message
5 const cssStyles = `
1// This val will respond with a fun "Hello World" HTML page with crazy CSS style
2
3export default async function(req: Request): Promise<Response> {
4 // CSS style for the HTML page
5 const cssStyle = `
1// This val will respond with a colorful "Hello World" HTML page with fun CSS styling
2
3export default async function(req: Request): Promise<Response> {
4 // HTML content with fun CSS styling
5 const htmlContent = `
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 // HTML content with fun CSS styling
5 const htmlContent = `
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 = `

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.