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=1786&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 18010 results for "function"(3485ms)

signECDSAmain.tsx1 match

@stevekrouse•Updated 1 year ago
1export function signECDSA(message, key) {
2 let encoded = new TextEncoder().encode(message);
3 return crypto.subtle.sign(

updateInspoListmain.tsx1 match

@stevekrouse•Updated 1 year ago
3import { verifyAPIAuth } from "https://esm.town/v/stevekrouse/verifyAPIAuth";
4
5export async function updateInspoList(newList, auth) {
6 let handle = await verifyAPIAuth(auth);
7 if (isValTownTeam(handle)) {

genericmain.tsx1 match

@stevekrouse•Updated 1 year ago
1export function generic<A>(
2 arr: A[],
3 criteria: (a: A) => string

notifyNewMessagesmain.tsx1 match

@stevekrouse•Updated 1 year ago
2import { messages } from "https://esm.town/v/stevekrouse/messages";
3
4export function notifyNewMessages() {
5 if (messages.length > messagesLengthLast)
6 console.email(

greetingmain.tsx1 match

@fallenmax•Updated 1 year ago
1// View at https://fallenmax-greeting.express.val.run?name=myName
2export async function greeting(req: express.Request, res: express.Response) {
3 const name = String(req.query.name);
4 const text = `Hello ${name}`;

testAndroidBingAppsmain.tsx1 match

@xuangong•Updated 1 year ago
2import { ruleAndroidAppsCheck } from "https://esm.town/v/xuangong/ruleAndroidAppsCheck";
3
4export async function testAndroidBingApps() {
5 const { default: axios } = await import("npm:axios");
6 const url =

myApimain.tsx1 match

@parweb•Updated 1 year ago
1import { myApi as myApi2 } from "https://esm.town/v/parweb/myApi";
2
3export function myApi(name) {
4 return myApi2("chris");
5}

pushovermain.tsx1 match

@meatcar•Updated 1 year ago
3// Send a pushover message.
4// token, user, and other opts are as specified at https://pushover.net/api
5export async function pushover({ token, user, message, title, url, ...opts }) {
6 return await fetch("https://api.pushover.net/1/messages.json", {
7 method: "POST",

myApimain.tsx1 match

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

messagememain.tsx1 match

@endingwithali•Updated 1 year ago
1import { message as message2 } from "https://esm.town/v/endingwithali/message";
2
3export function messageme(message) {
4 message2.push(message);
5}

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