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=1639&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 18979 results for "function"(1711ms)

caloriesmain.tsx2 matches

@stevekrouse•Updated 12 months ago
5import { Hono } from "npm:hono@3";
6
7function esmTown(url) {
8 return fetch(url, {
9 headers: {
92});
93
94export async function calorieEstimate(file: File) {
95 const dataURL = await fileToDataURL(file);
96 try {

launch_thrifty_idea_generatormain.tsx1 match

@cotr•Updated 12 months ago
1export default async function(req: Request): Promise<Response> {
2 if (req.method === "OPTIONS") {
3 return new Response("ok");

staticChessREADME.md1 match

@compuives•Updated 12 months ago
6Plain, brutalist, no bloat chess. Every page is only html and css. Every chess move is made by clicking a link. Send a link to your friend and they'll send you one back to make your move. No silly animations or slick interactivity to trip up your gameplay. When Google indexes this site will we successfully compute all possible chess moves?
7
8Functionality is quite limited, and things might be broken. Please let me know if you find bugs!
9
10Inspired by [this HN discussion](https://news.ycombinator.com/item?id=39456467) about sites that have all possible game states of tic-tac-toe.

aqimain.tsx1 match

@mihai•Updated 12 months ago
2import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI";
3
4export async function aqi(interval: Interval) {
5 const location = "bucharest"; // <-- change to place, city, or zip code
6 const data = await easyAQI({ location });

dubLinksUpsertmain.tsx1 match

@evilsteventey•Updated 12 months ago
7});
8
9export default async function(req: Request): Promise<Response> {
10 const { shortLink } = await dub.links.upsert({
11 url: "https://www.val.town/v/steventey/dubLinksUpsert",

apricotSlothmain.tsx1 match

@paulkinlan•Updated 12 months ago
5const newBoard = await board(() => {
6 const { result } = core.runJavascript({
7 code: "function name() { return { name: \"Hello\" };}",
8 "name": "name",
9 });

btcPriceAlertmain.tsx1 match

@thejian•Updated 12 months ago
4import { currency } from "https://esm.town/v/stevekrouse/currency";
5
6export async function btcPriceAlert() {
7 const lastBtcPrice: number = await blob.getJSON("lastBtcPrice");
8 let btcPrice = await currency("usd", "btc");

staticChessREADME.md1 match

@wesleychiyoka•Updated 12 months ago
6Plain, brutalist, no bloat chess. Every page is only html and css. Every chess move is made by clicking a link. Send a link to your friend and they'll send you one back to make your move. No silly animations or slick interactivity to trip up your gameplay. When Google indexes this site will we successfully compute all possible chess moves?
7
8Functionality is quite limited, and things might be broken. Please let me know if you find bugs!
9
10Inspired by [this HN discussion](https://news.ycombinator.com/item?id=39456467) about sites that have all possible game states of tic-tac-toe.

staticChessREADME.md1 match

@rickygrassmuck•Updated 12 months ago
6Plain, brutalist, no bloat chess. Every page is only html and css. Every chess move is made by clicking a link. Send a link to your friend and they'll send you one back to make your move. No silly animations or slick interactivity to trip up your gameplay. When Google indexes this site will we successfully compute all possible chess moves?
7
8Functionality is quite limited, and things might be broken. Please let me know if you find bugs!
9
10Inspired by [this HN discussion](https://news.ycombinator.com/item?id=39456467) about sites that have all possible game states of tic-tac-toe.

tootLatestPostsmain.tsx1 match

@geraldo•Updated 12 months ago
2import { newRSSItems } from "https://esm.town/v/stevekrouse/newRSSItems?v=6";
3
4export async function tootLatestPosts({ lastRunAt }: Interval) {
5 return Promise.all(
6 (await newRSSItems({

getFileEmail4 file matches

@shouser•Updated 2 weeks 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": "*",