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/?q=function&page=1696&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 17935 results for "function"(1923ms)

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];

rimemain.tsx1 match

@zzz•Updated 1 year ago
1import { runVal } from "https://esm.town/v/std/runVal";
2
3export async function rime(req, res) {
4 const url = req.url;
5 const { text = "Hello World" } = req.query;

Hellomain.tsx1 match

@ralfw•Updated 1 year ago
1import { hello_users } from "https://esm.town/v/ralfw/hello_users";
2
3export function Hello(name: string) {
4 hello_users.push(name);
5 const n = hello_users.filter((x) => x == name).length;

myApimain.tsx1 match

@fadi•Updated 1 year ago
1export function myApi(name) {
2 return { "name": name };
3}

myApimain.tsx1 match

@roniemeque•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 1 week 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": "*",