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=1416&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 17278 results for "function"(1192ms)

substrateBadgeREADME.md1 match

@substrateUpdated 9 months ago
10import substrateBadge from "https://esm.town/v/substrate/substrateBadge";
11
12export default async function(req: Request): Promise<Response> {
13 const badge = substrateBadge(import.meta.url);
14 const html = `

valwritermain.tsx2 matches

@janpaul123Updated 9 months ago
11 user: "website that shows the current time",
12 content: `/** @jsxImportSource npm:react */
13export default function() {
14 return <h1>{new Date().toLocaleTimeString()}</h1>;
15}`,
91 );
92});
93export async function compile(description: string) {
94 const messages = [
95 {

spotifymain.tsx1 match

@huntyUpdated 9 months ago
125});
126
127async function getToken(c) {
128 const state = c.req.query("state") as string;
129 const authData = await db.select().from(table).where(eq(table.id, state)).limit(1);

cronPoemForSammain.tsx1 match

@iamseeleyUpdated 9 months ago
2
3// 🦹‍♂️
4export default async function (interval: Interval) {
5 await sendDailyPoem();
6}

dailyPoemForSammain.tsx2 matches

@iamseeleyUpdated 9 months ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3async function getRandomPoem() {
4 const response = await fetch("https://poetrydb.org/random");
5 const [poem] = await response.json();
7}
8
9export async function sendDailyPoem() {
10 try {
11 const poem = await getRandomPoem();

linkInBioTemplatemain.tsx1 match

@mewtruUpdated 9 months ago
2import { renderToString } from "npm:react-dom/server";
3
4export default async function(req: Request) {
5 return new Response(
6 renderToString(

twitterAlertmain.tsx1 match

@jamiedubsUpdated 9 months ago
7const query = `"glif.app" OR "glifapp" OR "glif app" OR "@heyglif" -is:retweet`;
8
9export async function twitterAlert({ lastRunAt }: Interval) {
10 const results = await twitterSearch({
11 query,

twitterSearchmain.tsx1 match

@stevekrouseUpdated 9 months ago
3import { twitterUser } from "https://esm.town/v/stevekrouse/twitterUser";
4
5export async function twitterSearch({
6 query,
7 start_time,

twitterSearchmain.tsx1 match

@jamiedubsUpdated 9 months ago
3import { twitterUser } from "https://esm.town/v/stevekrouse/twitterUser";
4
5export async function twitterSearch({
6 query,
7 start_time,

private_modelmain.tsx1 match

@turbo1912Updated 9 months ago
4import { renderToString } from "npm:react-dom/server";
5
6export default async function(interval: Interval) {
7 const result = await fal.subscribe("turbo1912/multiple-models/sd", {
8 input: {

getFileEmail4 file matches

@shouserUpdated 1 week ago
A helper function to build a file's email
tuna

tuna8 file matches

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