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=2118&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 21917 results for "function"(2230ms)

valtownOpenAPImain.tsx1 match

@pomdtr•Updated 1 year ago
1import { openapi2TS } from "https://esm.town/v/pomdtr/openapi2TS";
2
3export async function valtownOpenAPI(req: Request) {
4 return new Response(
5 await openapi2TS(

listValsmain.tsx1 match

@pomdtr•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function listVals(req: Request) {
4 if (req.method == "GET") {
5 return Response.json({

telegrammain.tsx1 match

@pomdtr•Updated 1 year ago
2import { runVal } from "https://esm.town/v/std/runVal";
3
4export async function telegram(message: string) {
5 return runVal(
6 "pomdtr.sendToTelegram",

myApimain.tsx1 match

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

myApimain.tsx1 match

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

myApimain.tsx1 match

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

myApimain.tsx1 match

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

addTaskmain.tsx1 match

@ju2l0r•Updated 1 year ago
2import { tasks } from "https://esm.town/v/ju2l0r/tasks";
3
4export async function addTask(title) {
5 const newTask = {
6 id: Math.max(...tasks.map((t) => t.id)) + 1,

getmain.tsx1 match

@cyx•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function get() {
4 let places = [
5 {

logTestmain.tsx1 match

@twschiller•Updated 1 year ago
1export function logTest() {
2 const levels = ["info", "debug", "log", "warn", "error"];
3 const result = {};

getFileEmail4 file matches

@shouser•Updated 4 weeks 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.