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/$%7Bsuccess?q=function&page=2134&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 22564 results for "function"(3075ms)

untitled6372775main.tsx1 match

@eric•Updated 1 year ago
3import { getEmails } from "https://esm.town/v/eric/getEmails";
4
5untitled6372775 = export async function subscribe() {
6 const s = await getEmails()
7 console.log(s)

myApimain.tsx1 match

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

preactWebAppmain.tsx1 match

@easrng•Updated 1 year ago
1export const preactWebApp = (function () {
2 type propType =
3 & {

getCallermain.tsx3 matches

@easrng•Updated 1 year ago
2import { dynamicImport } from "https://esm.town/v/easrng/dynamicImport";
3
4export async function getCaller() {
5 if (arguments[0])
6 return;
13 );
14 const realGetStore = AsyncLocalStorage.prototype.getStore;
15 AsyncLocalStorage.prototype.getStore = function (...a) {
16 asyncLocalStorage = this;
17 return realGetStore.call(this, ...a);
26 //
27 // i tried caching the asyncLocalStorage,
28 // but it seemingly gets replaced with null at the end of the function call
29 (getCaller2 as any)(true);
30 AsyncLocalStorage.prototype.getStore = realGetStore;

paperMCListenermain.tsx1 match

@tr3ntg•Updated 1 year ago
2
3// Listen to webhooks from PaperMC
4export async function paperMCListener(request) {
5 await handlePaperMCEvent(request);
6}

valTownDailyInspomain.tsx1 match

@geanu02•Updated 1 year ago
1import { valTownInspirationEmail } from "https://esm.town/v/rodrigotello/valTownInspirationEmail?v=79";
2
3export async function valTownDailyInspo() {
4 return await valTownInspirationEmail();
5}

emailRandomJokemain.tsx2 matches

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

myApimain.tsx1 match

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

myApimain.tsx1 match

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

myApimain.tsx1 match

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

getFileEmail4 file matches

@shouser•Updated 1 month 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.