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=2672&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 29089 results for "function"(2238ms)

weatherOfLatLonmain.tsx1 match

@jdan•Updated 1 year ago
1import { weatherGovGrid } from "https://esm.town/v/stevekrouse/weatherGovGrid?v=4";
2
3export async function weatherOfLatLon(args: { lat: number; lon: number }) {
4 const { lat, lon } = args;
5 const grid = await weatherGovGrid({ lat, lon });

weatherOfLatLonREADME.md1 match

@jdan•Updated 1 year ago
1Migrated from folder: openai_function_calling/weatherOfLatLon

latLngOfCitymain.tsx1 match

@jdan•Updated 1 year ago
2import { load } from "npm:cheerio";
3
4export async function latLngOfCity(args: { cityName: string }) {
5 const { cityName } = args;
6 const html = await fetchText(

latLngOfCityREADME.md1 match

@jdan•Updated 1 year ago
1Migrated from folder: openai_function_calling/latLngOfCity

weatherBotREADME.md1 match

@jdan•Updated 1 year ago
1Migrated from folder: openai_function_calling/weatherBot

tree_valmain.tsx1 match

@pomdtr•Updated 1 year ago
1import { TreeItem } from "https://esm.town/v/pomdtr/tree_types";
2
3export function valItem({ author, name }: { author: string; name: string }): TreeItem {
4 return {
5 title: name,

twitterAlertmain.tsx1 match

@mimos•Updated 1 year ago
4const query = "\"val.town\" OR \"val town\" -_ValTown_";
5
6export async function twitterAlert({ lastRunAt }: Interval) {
7 const results = await twitterSearch({
8 query,

FunctionToHTMLFormmain.tsx4 matches

@dps•Updated 1 year ago
1import { valForm } from "https://esm.town/v/rodrigotello/valForm";
2import { multiplicationFunctionTest } from "https://esm.town/v/rodrigotello/multiplicationFunctionTest";
3
4export async function FunctionToHTMLForm(
5 req: express.Request,
6 res: express.Response,
7) {
8 let myFunctionValAsHTML = multiplicationFunctionTest; // Insert your function here and it should generate an HTML form
9 return res.send(`${valForm(myFunctionValAsHTML)}`);
10}

BlueCardChangeDetectormain.tsx1 match

@callumrollo•Updated 1 year ago
6const dateChangedKey = "work-permit-change-date";
7
8export default async function(interval: Interval) {
9 const page = await fetch(site).then(res => res.text());
10 const date = page.match(/Last updated: <time datetime="([^"]+)">/)?.[1].toString();

key_value_apimain.tsx1 match

@mjweaver01•Updated 1 year ago
14});
15
16app.post("/", async function(c) {
17 let res = await sqlite.execute({
18 sql: `insert into kv(key, value) values (:key, :value)`,
tuna

tuna9 file matches

@jxnblk•Updated 23 hours ago
Simple functional CSS library for Val Town

getFileEmail4 file matches

@shouser•Updated 1 month ago
A helper function to build a file's email
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": "*",
webup
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.