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=24&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 19140 results for "function"(1259ms)

blog-cloneindex.css1 match

@jamiesinclair•Updated 2 days ago
303 border-radius: 9999px;
304 transition-property: color, background-color;
305 transition-timing-function: ease-in-out;
306 transition-duration: 200ms;
307}

blog-cloneicons.tsx5 matches

@jamiesinclair•Updated 2 days 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

blog-cloneHomePage.tsx1 match

@jamiesinclair•Updated 2 days 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);

blog-cloneHead.tsx1 match

@jamiesinclair•Updated 2 days ago
7const HLJS_CSS_URL = "https://cdn.jsdelivr.net/npm/highlight.js@11.8.0/styles/base16/solar-flare-light.css";
8
9export default function Head({ title, post }: {
10 title: string;
11 post?: BlogPost;

blog-cloneget-posts.ts1 match

@jamiesinclair•Updated 2 days ago
4
5// Get all blog posts (local + RSS)
6export async function getAllBlogPosts(): Promise<BlogPost[]> {
7 return (await Promise.all([
8 getNewPosts(),

blog-cloneget-old-posts.ts2 matches

@jamiesinclair•Updated 2 days ago
4const OLD_BLOG_RSS = "https://val-town-blog.pages.dev/rss.xml";
5// Get blog posts from RSS feed
6async function getOldPosts(): Promise<BlogPost[]> {
7 const parser = new RssParser();
8 const feed = await parser.parseURL(OLD_BLOG_RSS);
289 "slug": "deprecating-the-run-api",
290 "link": "/blog/deprecating-the-run-api",
291 "description": "Not every function should be an API",
292 "pubDate": "Wed, 07 Feb 2024 00:00:00 GMT",
293 "author": "André Terron",

blog-cloneget-new-posts.ts2 matches

@jamiesinclair•Updated 2 days ago
5
6// Get all blog posts from the file system
7export async function getNewPosts(): Promise<BlogPost[]> {
8 const files = await listFiles(import.meta.url);
9 const blogPostFiles = files.filter(
42
43// Get a single blog post by slug
44export async function getBlogPostBySlug(slug: string): Promise<BlogPost | null> {
45 const post = posts.find(post => post.slug.includes(slug));
46 return post;

blog-cloneFooter.tsx1 match

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

blog-cloneEXAMPLE.md1 match

@jamiesinclair•Updated 2 days ago
21
22```typescript
23function hello() {
24 console.log("Hello, Val Town!");
25}

blog-cloneByline.tsx1 match

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

getFileEmail4 file matches

@shouser•Updated 2 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
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": "*",