UNPKG

1.34 kBTypeScriptView Raw
1import { AtomCategory, AtomContent, AtomLink, AtomPerson, AtomText, AtomTextType } from './AtomCommon';
2import { AtomEntry, AtomSource } from './AtomEntry';
3import { AtomFeed } from './AtomFeed';
4/** parses the feed */
5export declare function parseAtomFeed(data: string): AtomFeed;
6export declare function parseAtomEntry(entry: Element): AtomEntry;
7/** safely decode text content */
8export declare function safelyDecodeAtomText(type: AtomTextType, element: Element | undefined): string;
9/** shortcut for safely decoding the `.textContent` value of an element */
10export declare function sanitizeTextContent(element: Element | undefined): string | undefined;
11/** shortcut for safely decoding the an attribute value of an element */
12export declare function sanitizeTextAttribute<T = string>(element: Element | undefined, attributeName: string): T | undefined;
13export declare function parseAtomContent(content: Element | undefined): AtomContent;
14export declare function parseAtomText(text: Element | undefined): AtomText;
15export declare function parseAtomPerson(person: Element): AtomPerson;
16export declare function parseAtomLink(link: Element): AtomLink;
17export declare function parseAtomCategory(category: Element): AtomCategory;
18export declare function parseAtomSource(source: Element | undefined): AtomSource | undefined;