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/$2?q=function&page=2362&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 24748 results for "function"(5552ms)

unescapeHtmlmain.tsx1 match

@stevekrouse•Updated 1 year ago
1export function unescapeHtml(unsafe) {
2 return unsafe
3 .replace(/&/g, "&")

handleFormExample2main.tsx1 match

@stevekrouse•Updated 1 year ago
2import { email } from "https://esm.town/v/std/email?v=9";
3
4export async function handleFormExample2(params) {
5 await email({
6 text: JSON.stringify(params, null, 2),

r2Proxymain.tsx1 match

@stevekrouse•Updated 1 year ago
4import { verifyAPIAuth } from "https://esm.town/v/stevekrouse/verifyAPIAuth";
5
6export async function r2Proxy(key, value, auth) {
7 let { handle } = await verifyAPIAuth(auth);
8 if (!handle)

htmlToMarkdownmain.tsx1 match

@stevekrouse•Updated 1 year ago
1import { unescapeHtml } from "https://esm.town/v/stevekrouse/unescapeHtml";
2
3export async function htmlToMarkdown(str) {
4 let unescaped = await unescapeHtml(str);
5 return unescaped
1import { private_library_val } from "https://esm.town/v/stevekrouse/private_library_val";
2
3export function untitled_return_steverkrouse_secret() {
4 return private_library_val;
5}

hootsuiteNasamain.tsx1 match

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export async function hootsuiteNasa(req: express.Request, res: express.Response) {
4 const NASA_ROOT = "https://images-api.nasa.gov";
5 const alphaNumericSpaces = new RegExp("^[a-zA-Z0-9\\s-_]+$");

myApimain.tsx1 match

@jakesing•Updated 1 year ago
1import { myName } from "https://esm.town/v/jakesing/myName";
2
3export function myApi() {
4 return "hi " + myName;
5}

googleSheetsDatemain.tsx1 match

@kognise•Updated 1 year ago
1export function googleSheetsDate(date: Date): number {
2 return date.getTime() / 1000 / 60 / 60 / 24 + 25569
3}
1import { johnnycashtodolistcounter } from "https://esm.town/v/politelyinvinciblepointer/johnnycashtodolistcounter";
2
3export function getjohnnycashtodolistcounter() {
4 return johnnycashtodolistcounter;
5}

congressmain.tsx1 match

@devdoshi•Updated 1 year ago
2import { fetchCongressTradeReports } from "https://esm.town/v/claytn/fetchCongressTradeReports?v=3";
3
4export async function congress() {
5 let text;
6 fetchCongressTradeReports((reports) => text = reports);

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.