Something went wrong. Try again.
Syndication feed bot for Stoat supporting RSS, Atom, and JSON feeds. automod.vale.rocks
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930"use strict";
const VERBOSE = process.env["VERBOSE_LOGGING"] === "true" || process.env["VERBOSE_LOGGING"] === "1";
function verboseLog(...args: unknown[]): void { if (VERBOSE) console.log(...args);}
/** * Normalise a URL given in a command. Strips surrounding angle brackets */function stripUrlBrackets(url: string): string { let cleaned = url.trim(); if (cleaned.startsWith("<") && cleaned.endsWith(">")) { cleaned = cleaned.slice(1, -1).trim(); } return cleaned;}
/** * Wrap a URL in angle brackets so markdown renders it as a plain link. * Used for bot replies; posted feed items use bare links so embeds render. */function formatUrlForMarkdown(url: string): string { if (url === "") return url; return `<${url}>`;}
export { VERBOSE, verboseLog, stripUrlBrackets, formatUrlForMarkdown };