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/image-url.jpg%20%22Optional%20title%22?q=function&page=2136&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 22399 results for "function"(2888ms)

dateCalendarKeymain.tsx1 match

@tal•Updated 1 year ago
2
3type MenuType = (typeof DOEMenuTypes)[number];
4export function dateCalendarKey(opts: {
5 schoolYear: `${number}-${number}`;
6 month: string;

fetchAndStoremain.tsx1 match

@tal•Updated 1 year ago
5import { fetchDOEMenu } from "https://esm.town/v/tal/fetchDOEMenu";
6
7export async function fetchAndStore(opts: {
8 schoolYear: `${number}-${number}`;
9 month: string;

hnFollowShowHNPostsmain.tsx1 match

@george•Updated 1 year ago
3import { hnLatestPosts } from "https://esm.town/v/stevekrouse/hnLatestPosts?v=18";
4
5export async function hnFollowShowHNPosts() {
6 let posts = await hnLatestPosts({
7 tags: "show_hn",

communityBoatingFlagmain.tsx1 match

@twschiller•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function communityBoatingFlag() {
4 const response = await fetch("https://api.community-boating.org/api/flag");
5 const text = await response.text();

emailDailyJokemain.tsx2 matches

@jay•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function emailDailyJoke() {
4 async function fetchJoke() {
5 let response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",

myApimain.tsx1 match

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

tradestationMarginsmain.tsx3 matches

@simone•Updated 1 year ago
3let { tradestationMarginsState } = await import("https://esm.town/v/simone/tradestationMarginsState");
4
5export async function tradestationMargins() {
6 function zip(...arrays) {
7 const result = [];
8 for (let i = 0; i < arrays[0].length; i++) {
11 return result;
12 }
13 async function loadTradestationData() {
14 const cheerio = await import("npm:cheerio");
15 const response = await fetch(

timemain.tsx1 match

@vs•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export async function time() {
4 return await fetchJSON(
5 "https://api.openaq.org/v2/latest?" +

parseICSDatemain.tsx1 match

@U9G•Updated 1 year ago
1// From: https://www.npmjs.com/package/ical-date-parser
2export function parseICSDate(str) {
3 const T_INDEX = 8;
4 const Z_INDEX = 15;

lerpmain.tsx1 match

@andreterron•Updated 1 year ago
1export function lerp(from: number, to: number, ratio: number): number {
2 return from * (1.0 - ratio) + to * ratio;
3}

getFileEmail4 file matches

@shouser•Updated 4 weeks ago
A helper function to build a file's email
tuna

tuna8 file matches

@jxnblk•Updated 1 month ago
Simple functional CSS library for Val Town
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.