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/$%7Burl%7D?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 22663 results for "function"(1822ms)

testPondiverseaddCreation1 match

@argmnโ€ขUpdated 2 days ago
4import { TABLE_NAME } from "./updateTable";
5
6export default async function(req: Request): Promise<Response> {
7 // body contains:
8 // - title (string)

saml-helperAssertionViewer.tsx1 match

@mthadleyโ€ขUpdated 2 days ago
7}
8
9export default function AssertionViewer({ assertions }: AssertionViewerProps) {
10 const [expandedAssertions, setExpandedAssertions] = useState<Set<string>>(new Set());
11

readableDeepResarchindex.ts1 match

@willthereaderโ€ขUpdated 2 days ago
33});
34
35function extractTableData(html: string) {
36 // Remove all the complex ChatGPT styling and extract clean table data
37 let cleanHtml = html

saml-helperSamlDecoder.tsx1 match

@mthadleyโ€ขUpdated 2 days ago
11}
12
13export default function SamlDecoder({ onDecode, loading, error, samlResponse }: SamlDecoderProps) {
14 const [url, setUrl] = useState('');
15 const [certificate, setCertificate] = useState('');

readableDeepResarchREADME.md1 match

@willthereaderโ€ขUpdated 2 days ago
16- **Readable Table Format**: Applies consistent, professional styling
17- **Mobile Responsive**: Tables scroll horizontally on smaller screens
18- **Copy Functionality**: Export cleaned HTML for use elsewhere
19- **Real-time Processing**: Instant conversion of pasted HTML
20

readableDeepResarchindex.html3 matches

@willthereaderโ€ขUpdated 2 days ago
160 const processedTable = document.getElementById('processedTable');
161
162 function showMessage(message, type = 'error') {
163 messages.innerHTML = `<div class="${type}">${message}</div>`;
164 setTimeout(() => {
167 }
168
169 function showLoading(show) {
170 loading.classList.toggle('show', show);
171 }
228
229 // Auto-resize textarea
230 htmlInput.addEventListener('input', function() {
231 this.style.height = 'auto';
232 this.style.height = Math.min(this.scrollHeight, 300) + 'px';

saml-helperApp.tsx1 match

@mthadleyโ€ขUpdated 2 days ago
4import type { SamlResponse } from '../../shared/types.ts';
5
6export default function App() {
7 const [samlResponse, setSamlResponse] = useState<SamlResponse | null>(null);
8 const [loading, setLoading] = useState(false);

saml-helperutils.ts7 matches

@mthadleyโ€ขUpdated 2 days ago
1// Shared utility functions for SAML processing
2
3/**
4 * Extract SAML response from URL parameters
5 */
6export function extractSamlFromUrl(url: string): string | null {
7 try {
8 const urlObj = new URL(url);
17 * Decode base64 string
18 */
19export function decodeBase64(encoded: string): string {
20 try {
21 // Handle URL-safe base64
32 * Format XML string with indentation
33 */
34export function formatXml(xml: string): string {
35 try {
36 const parser = new DOMParser();
50 * Get text content from XML element
51 */
52export function getElementText(element: Element | null): string {
53 return element?.textContent?.trim() || '';
54}
57 * Get attribute value from XML element
58 */
59export function getElementAttribute(element: Element | null, attributeName: string): string | undefined {
60 return element?.getAttribute(attributeName) || undefined;
61}
64 * Convert XML NodeList to Array
65 */
66export function nodeListToArray(nodeList: NodeListOf<Element>): Element[] {
67 return Array.from(nodeList);
68}

saml-helperREADME.md1 match

@mthadleyโ€ขUpdated 2 days ago
28โ”œโ”€โ”€ shared/
29โ”‚ โ”œโ”€โ”€ types.ts # Shared TypeScript types
30โ”‚ โ””โ”€โ”€ utils.ts # Shared utility functions
31โ””โ”€โ”€ README.md
32```

To-owired-nieValTownLogo.tsx1 match

@toowiredโ€ขUpdated 2 days ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2
3export function ValTownLogo () {
4 return (
5 <svg

getFileEmail4 file matches

@shouserโ€ขUpdated 1 month ago
A helper function to build a file's email
tuna

tuna8 file matches

@jxnblkโ€ขUpdated 1 month 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.