UNPKG

@bliztek/feed-generator

Version:

A simple and lightweight Node.js library for generating RSS 2.0, Atom, and JSON Feed formats.

16 lines (15 loc) 683 B
export type XmlNode = { tag: string; attributes?: Record<string, string | number | boolean | undefined>; children?: (XmlNode | string)[]; selfClosing?: boolean; cdata?: boolean; }; export declare const escapeXml: (str: string) => string; export declare const renderXml: (xmlNodes: (XmlNode | string)[], depth?: number, compact?: boolean) => string; export declare const xmlDeclaration: () => string; export declare const el: (tag: string, value: string | undefined, opts?: { cdata?: boolean; attributes?: XmlNode["attributes"]; }) => XmlNode | null; export declare const nodes: (...items: (XmlNode | string | null | undefined)[]) => (XmlNode | string)[];