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=1819&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 18422 results for "function"(1497ms)

myGreetingmain.tsx1 match

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

sayHellomain.tsx1 match

@gera•Updated 1 year ago
1export function sayHello(name: string) {
2 console.log(`arg was ${name}`);
3 return `Hello, ${name}`;

wttrAstronomyReportDatamain.tsx1 match

@rwev•Updated 1 year ago
2import { wttrJson as wttrJson2 } from "https://esm.town/v/rwev/wttrJson";
3
4export async function wttrAstronomyReportData(location: string) {
5 const wttrJson = await wttrJson2(location);
6 const area = wttrJson.nearest_area[0];

wttrAstronomyToHTMLTablemain.tsx1 match

@rwev•Updated 1 year ago
2import { wrapInHTMLElements } from "https://esm.town/v/rwev/wrapInHTMLElements";
3
4export async function wttrAstronomyToHTMLTable(
5 jsonReport: any
6): Promise<string> {

myApimain.tsx1 match

@sokratis•Updated 1 year ago
1export function myApi(name) {
2 console.log("Hello world!");
3 return "hi " + name;

handleDiscordNewUsermain.tsx1 match

@neverstew•Updated 1 year ago
4// # New Val Town User (on Clerk) -> Val Town Discord notification
5// Translates one kind of webhook (Clerk) into another (Discord)
6export async function handleDiscordNewUser(req: Request) {
7 // check custom auth secret sent from clerk
8 if (req.headers.get("auth") !== process.env.clerkNonSensitive)

sunbeamValTownFnmain.tsx1 match

@pomdtr•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export function sunbeamValTownFn(valtownToken: string) {
4 return async (req: Request) => {
5 const { Hono } = await import("npm:hono");

myApimain.tsx1 match

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

checkRyanairmain.tsx1 match

@SlugeR•Updated 1 year ago
3export const checkRyanair = (async () => {
4 // Plan:
5 // 1. Make this function return Ryanair flights with desired prices according to params
6 // 2. Unhardcode params
7 // 3. Add email notification if found

myApimain.tsx1 match

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

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
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.