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/$%7Bart_info.art.src%7D?q=function&page=63&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 18558 results for "function"(1586ms)

eink-frameweather.ts1 match

@pcar•Updated 3 days ago
27};
28
29export default async function(
30 req: Request,
31 latitude: number = 37.5296,

eink-frameREADME.md1 match

@pcar•Updated 3 days ago
5#### Python code for display available at https://github.com/michaelwschultz/eink-frame
6
7## Functioning Hardware
8
9| News | NASA Photo of the Day |

eink-framenews.tsx2 matches

@pcar•Updated 3 days ago
6
7// REQUIRES API KEY - see api/news.ts
8function Render({ news }: { news: Record<string, any> }) {
9 const line = "To be taught if fortunate";
10
33}
34
35export default async function(req: Request): Promise<Response> {
36 const data = await GetNews(req).then((res: any) => res.json());
37

eink-framenews.ts1 match

@pcar•Updated 3 days ago
3const GUARDIAN_API_KEY = Deno.env.get("GUARDIAN_API_KEY");
4
5export default async function(req: Request): Promise<Response> {
6 const url = new URL(req.url);
7 const pageSize = url.searchParams.get("pagesize");

eink-frameindex.tsx1 match

@pcar•Updated 3 days ago
6import generateImageFromHtml from "./generateImageFromHtml.ts";
7
8export default async function(req: Request) {
9 const url = new URL(req.url);
10 const isImageRequest = url.searchParams.get("generate") === "image";

eink-framehemolog.tsx2 matches

@pcar•Updated 3 days ago
6
7// NOTE: Hemolog.com is a medication logging app for poeople with Hemophilia, like me 👋.
8function Render({ data }: { data: HEMOLOG_TREATMENT[] }) {
9 return (
10 <html>
41}
42
43export default async function(req: Request): Promise<Response> {
44 const data: HEMOLOG_TREATMENT[] = await GetLogs(req).then((res: any) => res.json());
45 const html = renderToString(<Render data={data} />);

eink-framehemolog.ts1 match

@pcar•Updated 3 days ago
16};
17
18export default async function(req: Request): Promise<Response> {
19 const url = new URL(req.url);
20

eink-framegenerateImageFromHtml.ts1 match

@pcar•Updated 3 days ago
3
4// TODO: Add caching of image
5export default async function generateImageFromHtml(
6 valUrl: string,
7 width: number = 800,

eink-framefontsTest.tsx2 matches

@pcar•Updated 3 days ago
4import { BodyWrapper, Content, Footer, Header, Headline } from "../components.tsx";
5
6function Render() {
7 const line = "To be taught if fortunate";
8 return (
36}
37
38export default async function(): Promise<Response> {
39 const html = renderToString(<Render />);
40

eink-framefetchWithCache.ts1 match

@pcar•Updated 3 days ago
6};
7
8export default async function fetchWithCache(
9 apiUrl: string,
10 cacheKey: string,

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.