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=1700&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 18181 results for "function"(3872ms)

FigmaFrameToHTMLmain.tsx1 match

@rodrigotello•Updated 1 year ago
1import { FigmaFrameObjectToHTMLTest } from "https://esm.town/v/rodrigotello/FigmaFrameObjectToHTMLTest";
2
3export async function FigmaFrameToHTML(
4 req: express.Request,
5 res: express.Response,

handleOnboardingServicesmain.tsx1 match

@rodrigotello•Updated 1 year ago
3
4// Triggered when someone tells us what they want to use VT for
5export async function handleOnboardingServices({ auth, handle, services }: {
6 auth: string;
7 handle: string;

myApimain.tsx1 match

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

handleChatGPTRequestmain.tsx1 match

@gtrufitt•Updated 1 year ago
1export async function handleChatGPTRequest(req: express.Request, res) {
2 console.log(req.body);
3 console.email("Ran");

myApimain.tsx1 match

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

get_random_complimentmain.tsx1 match

@vandyand•Updated 1 year ago
1import { compliments } from "https://esm.town/v/vandyand/compliments";
2
3export function get_random_compliment() {
4 const randomIndex = Math.floor(
5 Math.random() * compliments.length,

untitled_cS5pGEaVmain.tsx1 match

@baj•Updated 1 year ago
1export const untitled_cS5pGEaV = (async () => {
2 let count = 0;
3 function myApi() {
4 return count++;
5 }

myApimain.tsx1 match

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

addReactFromCDNmain.tsx1 match

@liamdanielduffy•Updated 1 year ago
1import { scriptTag } from "https://esm.town/v/liamdanielduffy/scriptTag";
2
3export function addReactFromCDN(): string {
4 const reactDom = scriptTag({
5 src: "https://unpkg.com/react-dom@18.2.0/umd/react-dom.production.min.js",

myApimain.tsx1 match

@pigrange•Updated 1 year ago
1export function myApi(name) {
2 return JSON.parse(
3 '{"code": 0,"message": "success","data": {"param1": "va success"}}',

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