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/$2?q=function&page=2789&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 29109 results for "function"(1857ms)

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}

assertmain.tsx1 match

@andreterron•Updated 1 year ago
1export async function assert(a, b, message?: string) {
2 const { default: { isEqual } } = await import("npm:lodash");
3 if (!isEqual(a, b)) {

myApimain.tsx1 match

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

getWttrmain.tsx1 match

@LavaC•Updated 1 year ago
2
3export let getWttr = async ({ location }) => {
4 function convertBlobToDataUrl(blob) {
5 return new Promise((resolve, reject) => {
6 const reader = new FileReader();
tuna

tuna9 file matches

@jxnblk•Updated 1 day ago
Simple functional CSS library for Val Town

getFileEmail4 file matches

@shouser•Updated 1 month ago
A helper function to build a file's email
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.