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=1742&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 19266 results for "function"(1215ms)

emailSubscriptionmain.tsx1 match

@petermillspaugh•Updated 1 year ago
7import { Hono } from "npm:hono";
8
9export async function emailSubscription(req: Request) {
10 const app = new Hono();
11

moduleFetchmain.tsx1 match

@easrng•Updated 1 year ago
3let cache: [string, AuthTokens] | undefined;
4
5export function moduleFetch(input: RequestInfo | URL, init?: RequestInit | undefined): Promise<Response> {
6 const req = new Request(input, init);
7 let authTokens = Deno.env.get("DENO_AUTH_TOKENS");

january2024main.tsx2 matches

@petermillspaugh•Updated 1 year ago
2import { sqlite } from "https://esm.town/v/std/sqlite?v=4";
3
4export function getJanuary2024Newsletter() {
5 const subject = "#1 — January 2024";
6 const webUrl = "https://petemillspaugh.com/january-2024";
169}
170
171async function insertIntoNewslettersTable() {
172 const { subject, webUrl, targetSendDate } = getJanuary2024Newsletter();
173

dailySubscriptionStatsmain.tsx1 match

@petermillspaugh•Updated 1 year ago
14];
15
16export async function dailyEmailSubscriptionStats(interval: Interval) {
17 const { rows: newSubs } = await sqlite.execute(`
18 SELECT name, email

createEmailLogsmain.tsx1 match

@petermillspaugh•Updated 1 year ago
1import { sqlite } from "https://esm.town/v/std/sqlite?v=4";
2
3export async function createEmailLogsTable() {
4 await sqlite.execute(
5 `

createNewslettersmain.tsx1 match

@petermillspaugh•Updated 1 year ago
1import { sqlite } from "https://esm.town/v/std/sqlite?v=4";
2
3export async function createNewslettersTable() {
4 await sqlite.execute(
5 `

get_weather_messagemain.tsx1 match

@cosmo•Updated 1 year ago
2import { getCurrentWeather } from "https://esm.town/v/cosmo/get_current_weather";
3
4export async function getWeatherMessage(apiKey, latitude, longitude) {
5 const currentWeather = await getCurrentWeather(latitude, longitude),
6 { icon } = currentWeather,

get_current_weathermain.tsx1 match

@cosmo•Updated 1 year ago
1export async function getCurrentWeather(latitude = 0, longitude = 0) {
2 const pointsResponse = await fetch(`https://api.weather.gov/points/${latitude},${longitude}`),
3 { properties: { forecastHourly } } = await pointsResponse.json(),

untitled_beigeCrabmain.tsx1 match

@tmcw•Updated 1 year ago
1export async function handle() {
2 // Schedule work to do later
3 new Promise<void>(async (resolve) => {

beaconmain.tsx1 match

@visnup•Updated 1 year ago
2import { parse } from "npm:cookie";
3
4export default async function(req: Request): Promise<Response> {
5 const origin = req.headers.get("origin") ?? "*";
6 const { D = randomUUID() } = parse(req.headers.get("cookie") ?? "");

getFileEmail4 file matches

@shouser•Updated 2 weeks ago
A helper function to build a file's email
tuna

tuna8 file matches

@jxnblk•Updated 3 weeks 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.