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=1726&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 17976 results for "function"(1461ms)

spellCheckTestmain.tsx3 matches

@steveb1313•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function spellCheckTest(
4 req: express.Request,
5 res: express.Response,
29 <h3>School: ${spell["school"]["name"]}</h3>
30 <h3>Description: ${spell["desc"][0]}</h3>
31 <button onclick="myFunction()">Reveal Spell</button><br>
32 <div id="myDIV"></div>
33 <button type="button" onClick="window.location.reload();">Check a new Spell</button>
34 </div>
35 <script>
36 function myFunction() {
37 var x = document.getElementById("myDIV");
38 if (x.innerHTML === "") {

myApimain.tsx1 match

@spoon•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

myApimain.tsx1 match

@lol•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

Diamond_Producemain.tsx1 match

@ralfw•Updated 1 year ago
2import { Diamond_Create } from "https://esm.town/v/ralfw/Diamond_Create";
3
4export function Diamond_Produce(size: number): string {
5 if (size <= 1)
6 return "*";

refreshermain.tsx1 match

@u•Updated 1 year ago
3import { refreshData } from "https://esm.town/v/u/refreshData";
4
5export async function refresher(name: string) {
6 let resp = "";
7 if (refreshData[name] === undefined) {

myApimain.tsx1 match

@sujeet•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

wikitxtmain.tsx1 match

@sdan•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function wikitxt(article: string) {
4 try {
5 const wiki = await fetch(

pollmain.tsx2 matches

@tmcw•Updated 1 year ago
21`;
22 const formClass = "p-2 group min-h-screen animate-all bg-pink-50";
23 function parseCookies(cookie: string) {
24 const out: Record<string, string> = {};
25 const c = cookie.split(";");
31 return out;
32 }
33 function getResults(hasVoted: boolean) {
34 return html`<html>
35 ${head}

twitterAPIDownAlertmain.tsx1 match

@stevekrouse•Updated 1 year ago
1import { twitterAPIDown } from "https://esm.town/v/stevekrouse/twitterAPIDown";
2
3export async function twitterAPIDownAlert() {
4 if (twitterAPIDown.down)
5 console.email(

runAllTestsmain.tsx1 match

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export async function runAllTests({
4 names,
5 api,

getFileEmail4 file matches

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

tuna8 file matches

@jxnblk•Updated 1 week ago
Simple functional CSS library for Val Town
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": "*",