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/image-url.jpg%20%22Optional%20title%22?q=function&page=1763&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 20286 results for "function"(2011ms)

LoginModalmain.tsx1 match

@iamseeley•Updated 11 months ago
1/** @jsxImportSource https://esm.sh/hono@latest/jsx */
2
3export default function LoginModal() {
4 return (
5 <>

RootLayoutmain.tsx1 match

@iamseeley•Updated 11 months ago
13}
14
15export default function RootLayout({ title, children, currentPath }: RootLayoutProps) {
16 return (
17 <html lang="en" hx-boost="true" hx-swap="outerHTML transition:true">

Headermain.tsx1 match

@iamseeley•Updated 11 months ago
7}
8
9export default function Header({ currentPath }: HeaderProps) {
10 return (
11 <header className="">

Navmain.tsx1 match

@iamseeley•Updated 11 months ago
2
3
4export default function Nav({ currentPath }) {
5 const isEditProfilePath = currentPath && currentPath.startsWith('/edit-profile/');
6

btcPriceAlertmain.tsx1 match

@richardkaplan•Updated 11 months ago
4import { currency } from "https://esm.town/v/stevekrouse/currency";
5
6export async function btcPriceAlert() {
7 const lastBtcPrice: number = await blob.getJSON("lastBtcPrice");
8 let btcPrice = await currency("usd", "btc");

AddLinkmain.tsx1 match

@iamseeley•Updated 11 months ago
2
3
4export default function AddLink({ username }) {
5 return (
6 <form action="/links" method="post" id="new-link" hx-push-url={`/edit-profile/${username}`} className="space-y-4">

getWeatherREADME.md1 match

@richardkaplan•Updated 11 months ago
1## Get Weather
2
3Simple function to get weather data from the free [wttr.in](https://wttr.in/:help) service.
4
5```ts

getWeathermain.tsx1 match

@richardkaplan•Updated 11 months ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export async function getWeather(location: string): Promise<WeatherResponse> {
4 return fetchJSON(`https://wttr.in/${location}?format=j1`);
5}

UserWidgetsmain.tsx1 match

@iamseeley•Updated 11 months ago
18}
19
20export default function UserWidgets({ user }: UserWidgetsProps) {
21 return (
22 <div>

forwardermain.tsx1 match

@richardkaplan•Updated 12 months ago
1import { email } from "https://esm.town/v/std/email?v=11";
2
3export function forwarder(e: {
4 from: string;
5 to: string[];

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.