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/$%7Bsuccess?q=function&page=2349&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 28846 results for "function"(1861ms)

funnyAmaranthCrabmain.tsx1 match

@savinoventura•Updated 6 months ago
5
6// Fetches a random joke.
7function fetchRandomJoke() {
8 const SAMPLE_JOKE = {
9 "setup": "What do you call a group of disorganized cats?",

valSessionmain.tsx2 matches

@maxm•Updated 6 months ago
20`;
21
22async function newSession(valTownToken: string) {
23 const privateKeyPem = `
24-----BEGIN PRIVATE KEY-----
38}
39
40function validate(token: string) {
41 const decoded = jwt.verify(token, publicKeyPem, { algorithms: ["RS256"] }) as
42 & Awaited<

getSubscribersmain.tsx3 matches

@petermillspaugh•Updated 6 months ago
1import { sqlite } from "https://esm.town/v/std/sqlite?v=4";
2
3export async function getSubscribers() {
4 const subs = await sqlite.execute(`
5 SELECT *
11await getSubscribers();
12
13export async function getNewsletters() {
14 const newsletters = await sqlite.execute(`
15 SELECT id, subject, web_url, target_send_date
20}
21
22export async function getEmailLogs() {
23 const logs = await sqlite.execute(`
24 SELECT id, newsletter_id, subscriber_id, sent_at

bskymain.tsx1 match

@wilhelm•Updated 6 months ago
5};
6
7export default async function(req: Request): Promise<Response> {
8 const url = "https://public.api.bsky.app/xrpc/app.bsky.feed.getAuthorFeed?actor=wilb.me&filter=posts_no_replies";
9

isAaronAtTheBadPlaceYetmain.tsx1 match

@karkowg•Updated 6 months ago
1export default async function () {
2 const handles = [
3 "aaronfrancis.com",

peacefulYellowBoamain.tsx1 match

@kevinmatula•Updated 6 months ago
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",

polishedCoffeeSlothmain.tsx1 match

@obenga24•Updated 6 months ago
5import { email } from "https://esm.town/v/std/email?v=9";
6// Fetches a random joke.
7function fetchRandomJoke() {
8 const SAMPLE_JOKE = {
9 "setup": "What do you call a group of disorganized cats?",

solidAquaHarriermain.tsx1 match

@mcfarquad•Updated 6 months ago
2
3// Fetches a random joke.
4function fetchRandomJoke() {
5 const SAMPLE_JOKE = {
6 "setup": "What do you call a group of disorganized cats?",

scientificSalmonBonobomain.tsx1 match

@ugochionyejiaka•Updated 6 months ago
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",

obedientPeachPheasantmain.tsx1 match

@johncassidy18•Updated 6 months ago
3
4// Fetches a random joke.
5async function fetchRandomJoke() {
6 const response = await fetch(
7 "https://official-joke-api.appspot.com/random_joke",
tuna

tuna9 file matches

@jxnblk•Updated 5 hours ago
Simple functional CSS library for Val Town

getFileEmail4 file matches

@shouser•Updated 1 month ago
A helper function to build a file's email
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.