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/$%7Burl%7D?q=function&page=1796&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 18182 results for "function"(2517ms)

myApimain.tsx1 match

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

myApimain.tsx1 match

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

valToModulemain.tsx1 match

@easrng•Updated 1 year ago
1export async function valToModule(req: express.Request, res: express.Response) {
2 try {
3 const { transpileVal } = await import(

myApimain.tsx1 match

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

myApimain.tsx1 match

@gideon•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function myApi() {
4 const url =
5 "https://everycampus.com/campus/c1e6333f-7f5b-475d-897a-c78e0a88135e";
1export function getTimeRemainingToSunsetAndSunrise(latitude, longitude) {
2 const timestamp = Math.floor(Date.now() / 1000); // Convert milliseconds to seconds
3 const latInRadians = latitude * Math.PI / 180;

myApimain.tsx1 match

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

FigmaFrameToHTMLmain.tsx1 match

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

myApimain.tsx1 match

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

prepareRunErrorsEmailmain.tsx3 matches

@andreterron•Updated 1 year ago
1export function prepareRunErrorsEmail(runs) {
2 if ((runs?.length ?? 0) === 0) {
3 return "";
11 byVal[valId] = byVal[valId] ? [...byVal[valId], run] : [run];
12 }
13 function errorMessage(err) {
14 if (err && "message" in err) {
15 return err.message;
17 return `${err}`;
18 }
19 function errorLine(run) {
20 return `Error: <a href="https://www.val.town/v/${
21 run.val.username.replace(/^@/, "")

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