HTTP101guideOutline1 match
1export default async function(req: Request): Promise<Response> {
2<p>
3First explain the point of the article.
1export default function fileWithLineNumbers(text: string, view_range = []) {
2return [
3undefined, // Line numbers are 1-indexed
magicalOrangeLobstermain.tsx8 matches
13}
1415function Tooltip({ children, content }: TooltipProps) {
16const [isVisible, setIsVisible] = useState(false);
17const tooltipRef = useRef<HTMLDivElement>(null);
52}
5354function formatBytes(bytes: number, decimals = 2) {
55if (bytes === 0) return "0 Bytes";
56const k = 1024;
61}
6263function copyToClipboard(text: string) {
64navigator.clipboard.writeText(text).then(() => {
65console.log("Text copied to clipboard");
69}
7071function ActionMenu({ blob, onDownload, onRename, onDelete, onMoveToPublic, onMoveOutOfPublic }) {
72const [isOpen, setIsOpen] = useState(false);
73const menuRef = useRef(null);
7677useEffect(() => {
78function handleClickOutside(event) {
79if (menuRef.current && !menuRef.current.contains(event.target)) {
80event.stopPropagation();
158}
159160function BlobItem({ blob, onSelect, isSelected, onDownload, onRename, onDelete, onMoveToPublic, onMoveOutOfPublic }) {
161const [isLoading, setIsLoading] = useState(false);
162const decodedKey = decodeURIComponent(blob.key);
219}
220221function App({ initialEmail, initialProfile }) {
222const encodeKey = (key: string) => encodeURIComponent(key);
223const decodeKey = (key: string) => decodeURIComponent(key);
645}
646647function client() {
648const initialEmail = document.getElementById("root").getAttribute("data-email");
649const initialProfile = JSON.parse(document.getElementById("root").getAttribute("data-profile"));
4import { formatAddress, formatJSON, MonoButtonWithStatus, Section } from "./ui.tsx";
56export function FarcasterMiniApp() {
7const [context, setContext] = useState<any>();
8const [walletAddresses, setWalletAddresses] = useState<any>();
2import { useState } from "https://esm.sh/react@19";
34export function Example() {
5return (
6<div class="m-5 mb-8">
MiniAppStarterneynar.ts7 matches
1const baseUrl = "https://api.neynar.com/v2/farcaster/";
23export async function fetchNeynarGet(path: string) {
4const res = await fetch(baseUrl + path, {
5method: "GET",
14}
1516export function fetchUser(username: string) {
17return fetchNeynarGet(`user/by_username?username=${username}`).then(r => r.user);
18}
19export function fetchUsersById(fids: string) {
20return fetchNeynarGet(`user/bulk?fids=${fids}`).then(r => r.users);
21}
2223export function fetchUserFeed(fid: number) {
24return fetchNeynarGet(
25`feed?feed_type=filter&filter_type=fids&fids=${fid}&with_recasts=false&with_replies=false&limit=100&cursor=`,
27}
2829export function fetchChannel(channelId: string) {
30return fetchNeynarGet(`channel?id=${channelId}`).then(r => r.channel);
31}
3233export function fetchChannelFeed(channelId: string) {
34return fetchNeynarGet(
35`feed/channels?channel_ids=${channelId}&with_recasts=false&limit=100`,
37}
3839export function fetchChannelsFeed(channelIds: array) {
40return fetchNeynarGet(
41`feed/channels?channel_ids=${channelIds.join(",")}&with_recasts=false&limit=100`,
helloWorldhelloWorld1 match
1export default async function (req: Request): Promise<Response> {
2return Response.json({ ok: true })
3}
blogget-new-posts.ts2 matches
56// Get all blog posts from the file system
7export async function getNewPosts(): Promise<BlogPost[]> {
8const files = await listFiles(import.meta.url);
9const blogPostFiles = files.filter(
4243// Get a single blog post by slug
44export async function getBlogPostBySlug(slug: string): Promise<BlogPost | null> {
45const post = posts.find(post => post.slug.includes(slug));
46return post;
matureBlueLemmingmain.tsx1 match
6);
78export async function uptimeCheck(url: string) {
9let reason: string, status: number, end: number;
10let ok = true;
6);
78export async function uptimeCheck(url: string) {
9let reason: string, status: number, end: number;
10let ok = true;