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=40&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 30772 results for "function"(2625ms)

mcp-starterREADME.md1 match

@nbbaierUpdated 2 days 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

@chadparkerUpdated 2 days 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

@lightweightUpdated 2 days 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

@Teddy2100Updated 2 days 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

@samxii777Updated 2 days ago
6const SHEET = Deno.env.get("GSHEET")!;
7
8export default async function handler() {
9 const data: Record<string, any> = {};
10
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 */

GlancerpollEnabledStatus.ts1 match

@lightweightUpdated 2 days ago
1export async function pollEnabledStatus() {
2 // this shouldn't run forever just b/c someone forgot to close their browser tab with the demo in it
3 const interval = 1000; // 10000;
EnhancedVNode

EnhancedVNodeREADME.md3 matches

@Teddy2100Updated 2 days ago
1# EnhancedVNode
2
3A minimalist, plugin-ready hyperscript-style utility for rendering elements with style normalization, class processing, and custom behavioral plugins. Compatible with React, Preact, or any functionally similar createElement.
4
5## ✨ Features
6
7- 🧱 Lightweight functional interface: const h = new EnhancedVNode(createElement)
8- 🎨 Normalizes class strings into Set and filters empty entries
9- 🎛️ Parses inline style into clean JS objects
46## 🔌 Plugins
47
48Plugins are just functions that receive and mutate the props object before rendering:
49
50```js
11import {registerPrompts} from "./prompts/promptsTools.ts"
12
13export function registerTools(
14 server: McpServer,
15 config: Config,
29}
30
31export function registerPromptsTools(server: McpServer, config: Config) {
32 registerPrompts(server, config)
33}
tuna

tuna9 file matches

@jxnblkUpdated 1 week ago
Simple functional CSS library for Val Town

getFileEmail4 file matches

@shouserUpdated 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.