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=2361&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 24586 results for "function"(2276ms)

expressHTMLExample2main.tsx1 match

@henrik•Updated 1 year ago
2
3// View at https://api.val.town/express/@stevekrouse.expressHTMLExample?name=Steve
4export async function expressHTMLExample2(
5 req: express.Request,
6 res: express.Response

myApimain.tsx1 match

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

myApimain.tsx1 match

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

likesmain.tsx1 match

@neverstew•Updated 1 year ago
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3
4export function likes({ token, offset, limit }: {
5 token: string;
6 offset?: number;

myApimain.tsx1 match

@moody•Updated 1 year ago
1export function myApi(name) {
2 console.email("Yo, " + name);
3 return "hi " + name;

myApimain.tsx1 match

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

myApimain.tsx1 match

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

sortedPostsmain.tsx1 match

@andreterron•Updated 1 year ago
1import { fetchTwitterUser } from "https://esm.town/v/andreterron/fetchTwitterUser";
2
3export async function sortedPosts({ accessToken, posts }: {
4 accessToken: string;
5 posts: {

calculatemain.tsx1 match

@rv15hwakarthik•Updated 1 year ago
1export function calculate(zip, amount) {
2 if (zip === "560061" && +amount > 800) {
3 return true;

IPmain.tsx1 match

@zzz•Updated 1 year ago
1// https://api.val.town/v1/express/zzz.IP
2export async function IP(req, res) {
3 const ip = req.get("true-client-ip") ??
4 req.get("x-forwarded-for")?.split(",")[0];

getFileEmail4 file matches

@shouser•Updated 1 month ago
A helper function to build a file's email
tuna

tuna8 file matches

@jxnblk•Updated 1 month 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.