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=643&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 16864 results for "function"(1269ms)

blogHomePage.tsx1 match

@jxnblk•Updated 4 weeks ago
5import Byline from "./Byline.tsx";
6
7export function HomePage({ posts }: { posts: BlogPost[] }) {
8 const latest = posts.at(0);
9 const top = posts.slice(1, 3);

blogutil.tsx2 matches

@jxnblk•Updated 4 weeks ago
1export function formatDate(dateString: string): string {
2 try {
3 const date = new Date(dateString);
12}
13
14export function dayOfWeek(dateString: string): string {
15 try {
16 return new Date(dateString).toLocaleDateString("en-US", {

blogSocialLinks.tsx1 match

@jxnblk•Updated 4 weeks ago
8} from "./icons.tsx";
9
10export default function SocialLinks () {
11 return (
12 <div className="social-links">

blogLogo.tsx1 match

@jxnblk•Updated 4 weeks ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2
3export default function (props: React.SVGProps<SVGSVGElement>) {
4 return (
5 <svg

blogicons.tsx5 matches

@jxnblk•Updated 4 weeks ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2
3export function RSSIcon (props: React.SVGProps<SVGSVGElement>) {
4 return (
5 <svg
24}
25
26export function TwitterIcon (props: React.SVGProps<SVGSVGElement>) {
27 return (
28 <svg
41}
42
43export function GitHubIcon (props: React.SVGProps<SVGSVGElement>) {
44 return (
45 <svg
59}
60
61export function BlueskyIcon (props: React.SVGProps<SVGSVGElement>) {
62 return (
63 <svg
75}
76
77export function DiscordIcon (props: React.SVGProps<SVGSVGElement>) {
78 return (
79 <svg

blogFooter.tsx1 match

@jxnblk•Updated 4 weeks ago
5const year = new Date().getFullYear();
6
7export default function Footer () {
8 return (
9 <footer className="container">

blogByline.tsx1 match

@jxnblk•Updated 4 weeks ago
2import { formatDate, dayOfWeek } from "./util.tsx";
3
4export default function Byline ({ post }: {
5 post: {
6 author: string;

observantGoldOctopusmain.tsx1 match

@AegirianVesper•Updated 4 weeks ago
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}
1import Graph from "https://deno.land/x/deno_chart/mod.ts";
2
3export default async function(req: Request): Promise<Response> {
4 const url = new URL(req.url);
5 const name = url.searchParams.get("name");

getFileEmail4 file matches

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

tuna8 file matches

@jxnblk•Updated 1 week ago
Simple functional CSS library for Val Town
webup
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.
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": "*",