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=1712&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 18152 results for "function"(1442ms)

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}`;

untitled_rt2wovqomain.tsx1 match

@zachnusbaum•Updated 1 year ago
1export const untitled_rt2wovqo = (async () => {
2 function myApi(name) {
3 return "hi " + name;
4 console.email("hi");

getVectorStoreBuildermain.tsx1 match

@webup•Updated 1 year ago
2import { getModelBuilder } from "https://esm.town/v/webup/getModelBuilder";
3
4export async function getVectorStoreBuilder(docs: object[], spec: {
5 type: "memory" | "baas";
6 provider?: "pinecone" | "milvus";
2import process from "node:process";
3
4export async function GetPelotonWorkoutsAndSaveToAirTable(
5 req: express.Request,
6 res: express.Response,
58 },
59 { typecast: true },
60 function (err, record) {
61 if (err) {
62 console.error(err);

getFileEmail4 file matches

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