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=1716&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 17289 results for "function"(1988ms)

public_signMessagemain.tsx1 match

@andre•Updated 1 year ago
2import process from "node:process";
3
4export function public_signMessage(message: string, password: string) {
5 if (password === process.env.sign_pwd) {
6 return private_signMessage(message);

syncMusclePowermain.tsx1 match

@sigdel•Updated 1 year ago
2import { db } from "https://esm.town/v/sigdel/db";
3
4export async function syncMusclePower(data: any) {
5 const { user, workouts, exercises, workoutLog } = data;
6 if (!db[user]) {

staleGithubPRsEmailmain.tsx2 matches

@ramkarthik•Updated 1 year ago
5// Sends an email with all the open PRs that have not had any activity
6// for specified period of days
7// Set up this function to run every day (or any interval)
8export async function staleGithubPRsEmail() {
9 // Set up a secret named githubRepos with all the repos you want to analyze (comma separated)
10 let repos = process.env.githubRepos.split(",").filter((r) =>

TanaPasteExamplemain.tsx1 match

@bikefixe•Updated 1 year ago
1export async function TanaPasteExample(req, res) {
2 // you call this functioin from Tana's make API request
3 // as https://api.val.town/express/@bikefixe.TanaPasteExample?arg=stufftopassin

untitled_magentaBeemain.tsx1 match

@xuesjiang•Updated 1 year ago
1export async function untitled_magentaBee() {
2 const { default: axios } = await import("npm:axios");
3 const url =

snsFromInscriptionmain.tsx1 match

@ryanwaits•Updated 1 year ago
1import { hexToUtf8 } from "https://esm.town/v/ryanwaits/hexToUtf8";
2
3export function snsFromInscription(inscription: any) {
4 if (inscription.inscription_number < 0)
5 return;

myApimain.tsx1 match

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

REACT_CDN_VALmain.tsx1 match

@liamdanielduffy•Updated 1 year ago
1import { REACT_MINIFIED } from "https://esm.town/v/liamdanielduffy/REACT_MINIFIED";
2
3export function REACT_CDN_VAL(req, res) {
4 res.set("Content-Type", "text/javascript");
5 res.send(REACT_MINIFIED);

pingmain.tsx1 match

@xyh•Updated 1 year ago
1export function ping() {
2 return "pong";
3}

myApimain.tsx1 match

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