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=1664&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 17971 results for "function"(2169ms)

sendTimemain.tsx1 match

@ning•Updated 1 year ago
1export async function sendTime() {
2 console.email(": nice to see you!");
3}

nowCastPMAQImain.tsx1 match

@stungeye•Updated 1 year ago
3import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
4
5export async function nowCastPMAQI({ location_id }) {
6 const { results } = await fetchJSON(
7 "https://api.openaq.org/v2/measurements?" +

tidbytXmain.tsx3 matches

@andreterron•Updated 1 year ago
1import { tidbytCircle } from "https://esm.town/v/andreterron/tidbytCircle";
2
3export async function tidbytX({ size = 7, bg = 0xffffff80, x: xColor = 0x9d174dff }: {
4 // b91c1c
5 // fecdd3
19 const center = Math.floor(size / 2);
20 img.setPixelColor(xColor, center, center);
21 function* radialSymmetrical(dx: number, dy: number) {
22 yield { x: dx, y: dy };
23 yield { x: -dx, y: -dy };
24 }
25 function* radialSymmetrical4(dx: number, dy: number) {
26 yield { x: dx, y: dy };
27 yield { x: dy, y: -dx };

Countermain.tsx1 match

@wonday•Updated 1 year ago
1let { count } = await import("https://esm.town/v/wonday/count");
2
3export function Counter() {
4 count += 1;
5 return `The count is ${count}`;

myApimain.tsx1 match

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

uuidmain.tsx1 match

@yieldray•Updated 1 year ago
1export async function uuid(req: express.Request, res: express.Response) {
2 res.set({
3 "Access-Control-Allow-Origin": "*",

myApimain.tsx1 match

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

friendOfAFriendmain.tsx1 match

@lukas•Updated 1 year ago
21 cursor?: string;
22};
23export async function friendOfAFriend(req: express.Request, res: express.Response) {
24 return (await feedGenerator({
25 feed: {

thememain.tsx3 matches

@shanberg•Updated 1 year ago
714 transitionProperty: "common",
715 transitionDuration: "fast",
716 transitionTimingFunction: "ease-out",
717 cursor: "pointer",
718 textDecoration: "none",
1232 transitionProperty: "common",
1233 transitionDuration: "fast",
1234 transitionTimingFunction: "ease-out",
1235 cursor: "pointer",
1236 textDecoration: "none",
1283 transitionProperty: "background",
1284 transitionDuration: "ultra-fast",
1285 transitionTimingFunction: "ease-in",
1286 _focus: {
1287 "--menu-bg": "colors.gray.100",

myApimain.tsx1 match

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