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=1&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 18318 results for "function"(1072ms)

webup
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.
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": "*",

rockPaperScissorsnew-file-1957.tsx2 matches

@yamoodles•Updated 1 hour ago
1export default async function(req: Request): Promise<Response> {
2 const html = `
3 <!DOCTYPE html>
71 let computerScore = 0;
72
73 function play(playerChoice) {
74 const choices = ['rock', 'paper', 'scissors'];
75 const computerChoice = choices[Math.floor(Math.random() * 3)];

OpenTownieLayoutRoute.tsx1 match

@charmaine•Updated 1 hour ago
3import { Header } from "./Header.tsx";
4
5export function LayoutRoute () {
6 // TODO fetch here because we're not doing any caching
7 // and we want the user data in the header ?

getFileEmail4 file matches

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

tuna8 file matches

@jxnblk•Updated 2 weeks ago
Simple functional CSS library for Val Town