@lacspace/feed-reader
Read the feeds you follow — the read-side complement to @lacspace/rss. Parse a fetched RSS 2.0, RSS 1.0 (RDF), Atom 1.0 or JSON Feed 1.1 body into one normalized shape, autodiscover the feeds a web page advertises, and score each source's health (staleness vs its own cadence, duplicate/poisoned items, volume spikes, missing fields, fetch error rate) so a large source list prunes itself. Robots.txt respect via @lacspace/robots. Deterministic, isomorphic, zero third-party deps, bring-your-own-fetch.
npm i @lacspace/feed-readerUsage
import { discoverFeeds, readFeed, feedFetchAllowed } from "@lacspace/feed-reader";
const feeds = discoverFeeds(html, "https://example.com/");
if (feedFetchAllowed(feeds[0].href, robotsTxt, "MyBot")) {
const body = await fetch(feeds[0].href).then(r => r.text());
const { feed, health } = readFeed(body);
// health → { score, status, ageHours, postsPerDay, duplicateRatio, spike, reasons }
}Exports 9
parseFeeddiscoverFeedscommonFeedPathsscoreFeedHealthreadFeedfeedFetchAllowedparseRobotsisAllowedtoISOKeywords
More in Newsroom Kit
Deterministic fact-consistency checks for generated articles — extract every number, amount, percentage, date and named entity (Devanagari digits, लाख/करोड scaling, रु/NPR, %/प्रतिशत, AD + Bikram Sambat dates) and verify each appears in, or is derivable from, the sources. Catches fabricated or drifted figures without an LLM rewrite round; cross-script entity matching via @lacspace/translit. Isomorphic, deterministic.
@lacspace/trend-detectBurst / trending-topic detection over your own stream of items — score entities and terms by how far their recent frequency departs from a rolling baseline (z-score + growth), per category, English + Nepali, with stopword filtering. Rank a writer queue by what's actually rising. No platform scraping, deterministic, isomorphic.