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=1693&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 18188 results for "function"(8382ms)

getTextmain.tsx1 match

@lolocoo•Updated 1 year ago
1export async function getText(data) {
2 console.log("hello");
3 return data;

myApimain.tsx1 match

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

myApimain.tsx1 match

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

discordMessagesmain.tsx1 match

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export function discordMessages({ botToken, channelId }) {
4 return fetchJSON(
5 `https://discord.com/api/channels/${channelId}/messages`,

safeCountermain.tsx1 match

@stevekrouse•Updated 1 year ago
18 //
19 // Note 1: If I referenced @stevekrouse.threadsafeStateEx here
20 // it would return the value of that val at the beginning of this function,
21 // before I acquired the lock. I fetch it's value now to get the most up-to-date
22 // value of it, now that I know it can't be updated until I release this lock.

myApimain.tsx1 match

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

myApimain.tsx1 match

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

myApimain.tsx1 match

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

testmain.tsx1 match

@venjiang•Updated 1 year ago
1export function test() {
2 return new Date();
3}

stopDeparturesmain.tsx1 match

@kognise•Updated 1 year ago
5import { stopDeparturesCache } from "https://esm.town/v/kognise/stopDeparturesCache";
6
7export async function stopDepartures(globalStopId: string) {
8 const cached = stopDeparturesCache[globalStopId];
9 if (cached && Date.now() - cached.time < transitCacheExpiry) {

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