feedsmith
Version:
Robust and fast parser and generator for RSS, Atom, JSON Feed, and RDF feeds, with support for Podcast, iTunes, Dublin Core, and OPML files.
14 lines • 420 B
JavaScript
import { locales } from '../../../common/config.js';
import { detectJsonFeed } from '../../../index.js';
import { parseFeed } from './utils.js';
export const parse = (value) => {
if (!detectJsonFeed(value)) {
throw new Error(locales.invalid);
}
const parsed = parseFeed(value);
if (!parsed) {
throw new Error(locales.invalid);
}
return parsed;
};
//# sourceMappingURL=index.js.map