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/$%7BsvgDataUrl%7D?q=function&page=15&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 30525 results for "function"(1563ms)

invest-trackerticker_http.tsx3 matches

@samxii777•Updated 1 day ago
29
30/* ---------- HTTP handler ---------- */
31export default async function(req: Request) {
32 /* 1 â–¸ headlines (6 total) */
33 const m = (await blob.getJSON<{ data: any[] }>("macro_news"))?.data ?? [];
75
76/* ---------- layout helpers ---------- */
77function buildPanel(ids: string[], data: any) {
78 const groups = { crypto: [], stocks: [], forex: [] } as Record<string, string[]>;
79 ids.forEach(id => groups[typeOf(id)].push(id));
86}
87
88function renderRows(ids: string[], data: any, size: "big" | "tiny" = "big") {
89 return ids.map(id => {
90 const d = data[id.toLowerCase()] ?? {};

beeminder-apimain.tsx3 matches

@cricks_unmixed4u•Updated 1 day ago
44}
45
46export async function addBeeminderDatapoint(
47 datapoint: BeeminderDatapoint,
48 token?: string,
94}
95
96export async function adjustBeeminderGoalRate(
97 goalSlug: string,
98 newRate: number,
161}
162
163export default async function(req: Request): Promise<Response> {
164 const url = new URL(req.url);
165 const path = url.pathname;

gissue-rolodexApp.tsx2 matches

@cricks_unmixed4u•Updated 1 day ago
2import { useState } from "https://esm.sh/react@18.2.0";
3
4console.log("useState", typeof useState); // should be 'function'
5
6
7export default function App(): React.JSX.Element {
8 const [refreshFrequency, setRefreshFrequency] = useState("");
9 const [isSubmitting, setIsSubmitting] = useState(false);

mcp-starterREADME.md1 match

@nbbaier•Updated 1 day ago
31
32The MCP TypeScript SDK uses Node-specific APIs that don't play nicely with Deno
33or edge functions:
34
35- https://github.com/modelcontextprotocol/typescript-sdk/issues/260

untitled-8413index.html1 match

@chadparker•Updated 1 day ago
37 import { createRoot } from 'https://esm.sh/react-dom@18.2.0/client';
38
39 function App() {
40 const [vals, setVals] = useState([]);
41 const [loading, setLoading] = useState(true);

GlancerblobKeyForDemoCache.ts1 match

@lightweight•Updated 1 day ago
1export async function blobKeyForDemoCache(id: string) {
2 // get the url of this file
3 // we'll use this to get values for the blob key
EnhancedVNode

EnhancedVNodevnode.js5 matches

@Teddy2100•Updated 1 day ago
7 this._createElement = createElement;
8
9 // Initialize goober with prefixing and bind the render function
10 setup(this._vnode.bind(this), prefix);
11
12 // Return the bound render function with attached helpers
13 return Object.assign(this._vnode.bind(this), {
14 toStyleObject: this.toStyleObject.bind(this),
33 // Registers a plugin that mutates props before rendering
34 plugin(fn) {
35 if (typeof fn !== "function") {
36 throw new TypeError("[EnhancedVNode] plugin must be a function");
37 } else {
38 this._plugins.push(fn);
96 }
97
98 // Core render function that normalizes props, applies plugins, and returns a VNode
99 _vnode(type, props, children) {
100 props = this._normalizeProps(props, children);

invest-trackercrypto_cron.tsx1 match

@samxii777•Updated 1 day ago
6const SHEET = Deno.env.get("GSHEET")!;
7
8export default async function handler() {
9 const data: Record<string, any> = {};
10

invest-trackercrypto_low_daily.tsx1 match

@samxii777•Updated 1 day ago
3import { crypto } from "./ticker_config.tsx";
4
5export default async function daily() {
6 const lows: Record<string, number> = {};
7
3 *
4 * This is the HTTP entry point for the ValTown MCP Server when deployed
5 * on ValTown itself. It excludes CLI-dependent functionality and uses
6 * header-based authentication with Hono and StreamableHTTPServerTransport.
7 */
tuna

tuna9 file matches

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