UNPKG

feedsmith

Version:

Fast, all‑in‑one feed parser and generator for RSS, Atom, RDF, and JSON Feed, with support for Podcast, iTunes, Dublin Core, and OPML files.

12 lines (11 loc) 371 B
import { locales } from "../../common/config.js"; import { parser } from "./config.js"; import { parseDocument } from "./utils.js"; //#region src/opml/parse/index.ts const parse = (value, options) => { const parsed = parseDocument(parser.parse(value), options); if (!parsed) throw new Error(locales.invalidOpmlFormat); return parsed; }; //#endregion export { parse };