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=560&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 19769 results for "function"(2079ms)

1export default async function(req: Request): Promise<Response> {
2 const url = new URL(req.url);
3 return fetch(new URL(url.pathname + url.search, "https://charmaine--a93382321b0211f086bb569c3dd06744.web.val.run"), {
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}

hellooooo000000shiningTealChickadee1 match

@charmaine•Updated 4 weeks ago
1export default async function(req: Request): Promise<Response> {
2 const url = new URL(req.url);
3 return fetch(new URL(url.pathname + url.search, "https://charmaine--de9cf8121af411f098be569c3dd06744.web.val.run"), {

hellooooo000000healthySilverPorpoise1 match

@charmaine•Updated 4 weeks ago
1export default async function(req: Request): Promise<Response> {
2 const url = new URL(req.url);
3 return fetch(new URL(url.pathname + url.search, "https://charmaine--de9cf8121af411f098be569c3dd06744.web.val.run"), {

hellooooo000000expertGoldGuanaco1 match

@charmaine•Updated 4 weeks ago
1export default function getRandomFact() {
2 const funFacts = [
3 "Honey never spoils—it's basically edible forever!",

val_to_project_converterApp.tsx1 match

@charmaine•Updated 4 weeks ago
5import { ConversionResults } from "./ConversionResults.tsx";
6
7export function App() {
8 const [apiKey, setApiKey] = useState<string>("");
9 const [valUrlsInput, setValUrlsInput] = useState<string>("");
12}
13
14export function ConversionResults({
15 results,
16 onReset,

val_to_project_converterSparkles.tsx1 match

@charmaine•Updated 4 weeks ago
2import React from "https://esm.sh/react@18.2.0";
3
4export function Sparkles() {
5 return (
6 <>

val_to_project_converterFooter.tsx1 match

@charmaine•Updated 4 weeks ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2export function Footer() {
3 return (
4 <div className="external-footer">

ntfyReadermain.tsx3 matches

@curtcox•Updated 4 weeks ago
4import React, { useEffect, useRef, useState } from "https://esm.sh/react@18.2.0";
5
6function App() {
7 const [cookies, setCookie] = useCookies(["ntfyTopics", "ntfyCredentials", "ntfySince", "ntfyUseCredentials"]);
8 const [topics, setTopics] = useState(cookies.ntfyTopics || "");
163}
164
165function client() {
166 createRoot(document.getElementById("root")).render(<App />);
167}
168if (typeof document !== "undefined") { client(); }
169
170export default async function server(request: Request): Promise<Response> {
171 return new Response(
172 `

getFileEmail4 file matches

@shouser•Updated 3 weeks ago
A helper function to build a file's email
tuna

tuna8 file matches

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