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=1478&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 18573 results for "function"(1874ms)

forwardermain.tsx1 match

@stevekrouse•Updated 8 months ago
5const { author, name } = extractValInfo(import.meta.url);
6
7export async function forwarder(e: Email) {
8 let attachments: AttachmentData[] = [];
9 for (const f of e.attachments) {

forwardermain.tsx1 match

@maxm•Updated 8 months ago
5const { author, name } = extractValInfo(import.meta.url);
6
7export async function forwarder(e: Email) {
8 let attachments: AttachmentData[] = [];
9 for (const f of e.attachments) {

isMyWebsiteDownmain.tsx1 match

@rareadmin•Updated 8 months ago
6);
7
8export async function uptimeCheck(url: string) {
9 let ok = true;
10 let reason: string;

sqliteExplorerAppREADME.md1 match

@lukedenton•Updated 8 months ago
33- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
34- [x] make result tables scrollable
35- [x] add export to CSV, and JSON (CSV and JSON helper functions written in [this val](https://www.val.town/v/nbbaier/sqliteExportHelpers). Thanks to @pomdtr for merging the initial version!)
36- [x] add listener for cmd+enter to submit query

homepagemain.tsx3 matches

@csl_•Updated 8 months ago
9import { createRoot } from "https://esm.sh/react-dom/client";
10
11function App() {
12 const subheadings = [
13 "doing this for fun",
68}
69
70function client() {
71 createRoot(document.getElementById("root")).render(<App />);
72}
74if (typeof document !== "undefined") { client(); }
75
76async function server(request: Request): Promise<Response> {
77 return new Response(
78 `

northernChocolateFishmain.tsx1 match

@seanyang0813•Updated 8 months ago
1import { email } from "https://esm.town/v/std/email";
2
3export default async function(interval: Interval) {
4 await email({
5 subject: "This is your daily ping!",

AlgoliaDocumentaionmain.tsx1 match

@willthereader•Updated 8 months ago
165The jsDelivr CDN is highly available with over 110 locations in the world.
166
167You will then have access to the instantsearch function in the global scope (window).
168
169JavaScript

apimain.tsx1 match

@iamseeley•Updated 8 months ago
1import { API_URL } from "https://esm.town/v/std/API_URL";
2
3export async function api<T = any>(
4 path: string,
5 options?: RequestInit & {

valTownDataLogsmain.tsx1 match

@iamseeley•Updated 8 months ago
1import { valTownUser } from "https://esm.town/v/iamseeley/valTownUser";
2
3async function logUserData() {
4 try {
5 const username = await valTownUser.getUsername();

valTownUserREADME.md1 match

@iamseeley•Updated 8 months ago
1**👤 valTownUser**
2
3The `valTownUser` object provides a convenient interface to interact with Val Town's API and access user-specific information and functionalities.
4
5## User Information

getFileEmail4 file matches

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

tuna8 file matches

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