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=1390&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 18948 results for "function"(2944ms)

uptimemain.tsx1 match

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

imageToAnsimain.tsx1 match

@g•Updated 6 months ago
28import { Chalk, type Options as ChalkOptions } from 'npm:chalk';
29
30export async function imageToAnsi(
31 src: string | Image,
32 opts?: Partial<

codecommentermain.tsx2 matches

@JamesAndrew•Updated 6 months ago
15);
16
17function App() {
18 const [input, setInput] = useState("");
19 const [output, setOutput] = useState("");
85}
86
87export default async function server(request: Request): Promise<Response> {
88 if (request.method === "POST" && new URL(request.url).pathname === "/comment") {
89 const { OpenAI } = await import("https://esm.town/v/std/openai");

sqliteExplorerAppREADME.md1 match

@sammeltassen•Updated 6 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

snugPinkHummingbirdmain.tsx1 match

@g•Updated 6 months ago
1import { imageToAnsi } from 'https://esm.town/v/g/imageToAnsi';
2
3export default async function(req: Request): Promise<Response> {
4 const url = new URL(req.url);
5

us_election_color_schememain.tsx3 matches

@metart43•Updated 6 months ago
13
14// Define the Card component with the gray subtitle
15function ColorCard({ name, blue, red }) {
16 return (
17 <article
66
67// Define the main component to display all cards in a responsive grid layout
68function ColorCards() {
69 return (
70 <main
127}
128
129// Server-side rendering function with DOCTYPE, viewport meta tag, and rendered HTML
130export const reactExample = (request: Request) =>
131 new Response(

val_f878KIN01Kmain.tsx2 matches

@dhvanil•Updated 6 months ago
1
2 export async function val_f878KIN01K(req) {
3 try {
4 // Execute the code directly and capture its result
43};
44
45// Test the combined function with updated logic
46const testStrings = [
47 '()abacdfgdcaba()',

val_jn71Wf8hn2main.tsx2 matches

@dhvanil•Updated 6 months ago
1
2 export async function val_jn71Wf8hn2(req) {
3 try {
4 // Execute the code directly and capture its result
43};
44
45// Test the combined function
46const testStrings = [
47 '()abacdfgdcaba()',

val_vzWqpVMPzRmain.tsx2 matches

@dhvanil•Updated 6 months ago
1
2 export async function val_vzWqpVMPzR(req) {
3 try {
4 // Execute the code directly and capture its result
12};
13
14// Test the combined function
15const testStrings = [
16 '()abacdfgdcaba()',

val_iWH7hGnj6Jmain.tsx2 matches

@dhvanil•Updated 6 months ago
1
2 export async function val_iWH7hGnj6J(req) {
3 try {
4 // Execute the code directly and capture its result
22};
23
24// Test the palindromic function
25const testString = "abacdfgdcaba";
26const palindromicResults = findPalindromicSubstrings(testString);

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.