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/$%7Bsuccess?q=function&page=1778&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 18182 results for "function"(3132ms)

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

myApimain.tsx1 match

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

women_and_powermain.tsx2 matches

@andreterron•Updated 1 year ago
9 const black = p.color(0, 0, 0, 255);
10 const white = p.color(255, 255, 255, 255);
11 function triangle(x: number, y: number) {
12 return Math.min(x, 1 - x) < y ? 0 : 1;
13 }
14 function fract(v: number) {
15 return v - Math.floor(v);
16 }

myApimain.tsx1 match

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

monitoringEventBusmain.tsx1 match

@tzq•Updated 1 year ago
1import { monitoringGitHubRepository } from "https://esm.town/v/tzq/monitoringGitHubRepository";
2
3export async function monitoringEventBus() {
4 monitoringGitHubRepository("tzq0301/eventbus");
5}

fetchTimelinemain.tsx1 match

@dpetrouk•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function fetchTimeline(url, options) {
4 // const tweetId = url.match(/\/(\d*)\?+/)[1];
5 // const tweetUrl =

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