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=1758&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 18857 results for "function"(2160ms)

myApimain.tsx1 match

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

EmailNotifIfDidntCodemain.tsx1 match

@Davidkim•Updated 1 year ago
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3
4export async function EmailNotifIfDidntCode() {
5 type Data = DataItem[];
6 interface DataItem {

camelCasemain.tsx1 match

@jolodev•Updated 1 year ago
1export function camelCase(str) {
2 return str.replace(/-([a-z])/g, (g) => g[1].toUpperCase());
3}

getNextMSUrlToScrapePublicmain.tsx1 match

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

myApimain.tsx1 match

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

githubFollowersmain.tsx1 match

@stungeye•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export async function githubFollowers() {
4 let followers = await fetchJSON(
5 "https://api.github.com/users/stungeye/followers",

homemain.tsx1 match

@rym•Updated 1 year ago
3
4// Access via https://api.val.town/v1/express/rym.home
5export async function home(req: express.Request, res: express.Response) {
6 const blocks = await blocks2();
7 console.log(

getCurrentWeekmain.tsx1 match

@ray1214•Updated 1 year ago
1// 第几周
2export function getCurrentWeek(): number {
3 const now = new Date();
4 const firstDayOfYear = new Date(now.getFullYear(), 0, 1);

expressHTMLExamplemain.tsx1 match

@slade•Updated 1 year ago
1export async function expressHTMLExample(req, res) {
2 return res.send(`<h1>Hi ${req.query.name || req.body.name}!</h1>`);
3}

myApimain.tsx1 match

@sbeben•Updated 1 year ago
1export function myApi() {
2 return ` <!DOCTYPE html><html lang=";
3 en;

getFileEmail4 file matches

@shouser•Updated 2 weeks 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": "*",