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=778&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 7825 results for "function"(459ms)

exampleAuthApimain.tsx1 match

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

alivemain.tsx1 match

@stevekrouse•Updated 1 year ago
1import { wikidata } from "https://esm.town/v/stevekrouse/wikidata";
2
3export async function alive(name) {
4 let data = await wikidata(
5 `SELECT ?person ?personLabel ?birth_date ?death_date WHERE {

valTownDailyInspomain.tsx1 match

@stevekrouse•Updated 1 year ago
1import { valTownInspirationEmail } from "https://esm.town/v/rodrigotello/valTownInspirationEmail?v=79";
2
3export async function valTownDailyInspo() {
4 return await valTownInspirationEmail();
5}

duckdbExamplemain.tsx1 match

@tmcw•Updated 1 year ago
2
3export let duckdbExample = (async () => {
4 async function createWorker(url: string) {
5 const workerScript = await fetch(url);
6 const workerURL = URL.createObjectURL(await workerScript.blob());

exampleExpressHandlermain.tsx1 match

@stevekrouse•Updated 1 year ago
1export async function exampleExpressHandler(
2 req: express.Request,
3 res: express.Response

runOnPageLoadmain.tsx1 match

@stevekrouse•Updated 1 year ago
1export function runOnPageLoad(name) {
2 console.email("page loaded!");
3 return `hi ${name} from val town!`;

setPollRSSInkAndSwitchmain.tsx1 match

@stevekrouse•Updated 1 year ago
1let { pollRSSInkAndSwitch } = await import("https://esm.town/v/stevekrouse/pollRSSInkAndSwitch");
2
3export function setPollRSSInkAndSwitch(newVal) {
4 pollRSSInkAndSwitch = newVal;
5}

tmain.tsx1 match

@tmcw•Updated 1 year ago
1import { h } from "https://esm.town/v/tmcw/h";
2
3export function t(tag: string, args: any = {}, children: any[] = []) {
4 const func = (...argsOrChildren: any) => {
5 if (Array.isArray(argsOrChildren[0]))

big_story_visualizationmain.tsx1 match

@tmcw•Updated 1 year ago
47
48
49 function render() {
50 const width = window.innerWidth;
51 const output = Plot.plot({

cloudmailinmain.tsx1 match

@stevekrouse•Updated 1 year ago
1export function cloudmailin(req, res) {}

getFileEmail4 file matches

@shouser•Updated 6 days ago
A helper function to build a file's email

TwilioHelperFunctions

@vawogbemi•Updated 2 months ago