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=1754&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 18574 results for "function"(3257ms)

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}

getTangleCommentsmain.tsx1 match

@willthereader•Updated 1 year ago
2import { email } from "https://esm.town/v/std/email?v=9";
3
4export async function getTangleComments({ lastRunAt }) {
5 let response = await fetch(
6 "https://www.readtangle.com/members/api/comments/?limit=5&order=created_at%20DESC%2C%20id%20DESC&filter=post_id%3A6525827c68f969000134e052%2Bcreated_at%3A%3C%3D2023-10-13T20%3A55%3A23.163Z&page=2",

myApimain.tsx1 match

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

tutumain.tsx1 match

@VictorForissier•Updated 1 year ago
1export function tutu() {
2 return "Hello world";
3}

messageBoardmain.tsx1 match

@jdan•Updated 1 year ago
1import { messages } from "https://esm.town/v/jdan/messages";
2
3export function messageBoard(req, res) {
4 // make sure u change this or else i'll get your messages
5 const action = "https://jdan-writeMessage.express.val.run";

myApimain.tsx1 match

@zzz•Updated 1 year ago
1export function myApi(name) {
2 name = name || "Guest";
3 return `Hello, ${name}`;

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