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=2098&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 22148 results for "function"(3809ms)

rawmain.tsx1 match

@neverstew•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export async function raw(val: `@${string}.${string}`) {
4 const [owner, name] = val.slice(1).split(".") as string[];
5 return fetchJSON(

runmain.tsx1 match

@neverstew•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function run(
4 { username, valName, data, token }: Params,
5): Promise<Result> {

myApimain.tsx1 match

@impactvelocity•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}
1export function getRotationFromFFmpegDisplayMatrixString(str: string) {
2 let elements = str.match(/[-+]?\d+/g)?.map(Number) || [];
3 if (elements.length !== 9) {

handleSanguineGithubWebhookmain.tsx1 match

@nico•Updated 1 year ago
2import process from "node:process";
3
4export async function handleSanguineGithubWebhook(
5 req: express.Request,
6 res: express.Response,

myApimain.tsx1 match

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

untitled6597015main.tsx1 match

@maxmetcalfe•Updated 1 year ago
1export let untitled6597015 = default async function() {
2 console.log("here")
3}

myApimain.tsx1 match

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

parseMenuOfferingmain.tsx1 match

@tal•Updated 1 year ago
1export async function parseMenuOffering(text: string) {
2 /** get rid of the wrapping {} */
3 const stripped = text.slice(1, -1);

myApimain.tsx1 match

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

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.