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=1674&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 17342 results for "function"(1984ms)

testEmail2main.tsx1 match

@stevekrouse•Updated 1 year ago
3import { set } from "https://esm.town/v/std/set?v=11";
4
5export async function testEmail2(e: {
6 from: string;
7 to: string[];

valOutputmain.tsx1 match

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export async function valOutput(req: Request) {
4 const url = new URL(req.url);
5 const pattern = /^\/([^\/]+)\/([^@]+)(?:@([^\.]+))?$/;

serverlessMatrixEchoBot2main.tsx1 match

@stevekrouse•Updated 1 year ago
1export async function serverlessMatrixEchoBot2(req, res) {
2 console.log(req.path);
3 res.send("<h1>working!</h1>");

sparklineSVGmain.tsx1 match

@stevekrouse•Updated 1 year ago
1export function sparklineSVG({ strokeWidth, data, height, width, fill, stroke }) {
2 let vb_width = data.length - 1;
3 let vb_height = Math.max(...data);

notifyNewmain.tsx2 matches

@stevekrouse•Updated 1 year ago
5// Customizable notifications
6// Example usage: @stevekrouse.dateMeNotify
7export function notifyNew<A>({ getData, name }: {
8 getData: (d?: Date) => A[] | Promise<A[]>;
9 name: string;
10}) {
11 return async function ({ lastRunAt }: Interval) {
12 const oldData = await upstash(name);
13 const currentData = await getData(lastRunAt);

messagealimain.tsx1 match

@endingwithali•Updated 1 year ago
1import { message as message2 } from "https://esm.town/v/endingwithali/message";
2
3export function messageali(message) {
4 message2.push(message);
5 return "THANKS";

myApimain.tsx1 match

@hamza•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}
1import { innerfeelingscounter } from "https://esm.town/v/politelyinvinciblepointer/innerfeelingscounter";
2
3export function getinnerfeelingscounter() {
4 return innerfeelingscounter;
5}
1import { findingmyvoicecounter } from "https://esm.town/v/politelyinvinciblepointer/findingmyvoicecounter";
2
3export function getfindingmyvoicecounter() {
4 return findingmyvoicecounter;
5}

myApimain.tsx1 match

@threecordguy•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": "*",