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/?q=function&page=1732&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 17970 results for "function"(1686ms)

formFeedbackAlertmain.tsx1 match

@stevekrouse•Updated 1 year ago
3import { docsFeedback } from "https://esm.town/v/stevekrouse/docsFeedback";
4
5export async function formFeedbackAlert(interval: Interval) {
6 let newFeedback = docsFeedback
7 .filter((f) => new Date(f.time) > interval.lastRunAt);

blemishmain.tsx1 match

@hankenstein•Updated 1 year ago
1export function blemish() {
2 return "where the good guys go";
3}

getWeatherByCoordsmain.tsx1 match

@onemanwenttomow•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export async function getWeatherByCoords(lat, long) {
4 const weather = await fetchJSON(
5 `https://api.open-meteo.com/v1/forecast?latitude=${lat}&longitude=${long}&hourly=temperature_2m,precipitation_probability&forecast_days=1`,

myApimain.tsx1 match

@sean0923•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}
1let { findingmyvoicecounter } = await import("https://esm.town/v/politelyinvinciblepointer/findingmyvoicecounter");
2
3export function increasefindingmyvoicecounter() {
4 findingmyvoicecounter++;
5}
1let { rantcounter } = await import("https://esm.town/v/politelyinvinciblepointer/rantcounter");
2
3export function increaserantcounter() {
4 rantcounter++;
5}

expressHTMLExamplemain.tsx1 match

@zeitport•Updated 1 year ago
2
3type MyData = string;
4export async function expressHTMLExample(
5 req: express.Request,
6 res: express.Response,

multiplicationFunctionTestmain.tsx1 match

@rodrigotello•Updated 1 year ago
1export function multiplicationFunctionTest(a: number, b: number): number {
2 return a * b;
3}

peelSessionArtistmain.tsx1 match

@aeaton•Updated 1 year ago
1import { fetchHtmlDom } from "https://esm.town/v/aeaton/fetchHtmlDom";
2
3export async function peelSessionArtist(url) {
4 const dom = await fetchHtmlDom(url);
5 const title = dom.querySelector("h3")?.textContent.trim();

myApimain.tsx1 match

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

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