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=1774&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 18147 results for "function"(4457ms)

deleteValmain.tsx1 match

@neverstew•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export function deleteVal({ token, id }: {
4 token: string;
5 id: string;

myApimain.tsx1 match

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

myApimain.tsx1 match

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

gpt3main.tsx1 match

@isfeng•Updated 1 year ago
1import { runVal } from "https://esm.town/v/std/runVal";
2
3export async function gpt3(msg) {
4 return await runVal("patrickjm.gpt3", {
5 prompt: JSON.stringify(msg),

testmain.tsx1 match

@xiyouMc•Updated 1 year ago
1export function test() {
2 return "AAAA";
3}

untitled0045282main.tsx1 match

@eric•Updated 1 year ago
3import { getEmails } from "https://esm.town/v/eric/getEmails";
4
5untitled0045282 = export async function asyncSubscribe() {
6 const s = await getEmails()
7 console.log(s)

github_avatarmain.tsx1 match

@ski•Updated 1 year ago
1export function github_avatar(username) {
2 return `https://github.com/${username}.png`;
3}

aqiInProgressmain.tsx2 matches

@stungeye•Updated 1 year ago
4
5// # Email alerts when air is unhealthy near you
6export async function aqiInProgress() {
7 async function mapLocationsToQuality(locations) {
8 const promises = Object.entries(locations).map(async ([name, id]) => {
9 const warningThresold = 75;

myApimain.tsx1 match

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

measureValTownE2emain.tsx1 match

@healeycodes•Updated 1 year ago
28
29 console.log(
30 `average e2e user function time: ${(
31 userFuncTimes.reduce((a, b) => a + b, 0) / count
32 ).toFixed(0)}ms (fastest was ${userFuncTimes

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
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": "*",