UNPKG

einvoicing

Version:

A JavaScript library for creating and parsing electronic invoices compliant with the eInvoicing Directive, EN 16931, and popular extensions

28 lines (27 loc) 797 B
/** * Helpers * * @copyright Vitalii Savchuk <esvit666@gmail.com> * @package esvit/einvoicing * @licence MIT https://opensource.org/licenses/MIT */ export type XmlNode = any; /** * Returns the string value of a node or undefined if the node is null or undefined. * * @param node xml node */ export declare function strOrUnd(node: XmlNode): string | undefined; /** * Returns the number value of a node or undefined if the node is null or undefined. * * @param node xml node */ export declare function numOrUnd(node: XmlNode): number | undefined; /** * Returns the array of nodes or an empty array if the node is null or undefined. * * @param node xml node * @param path path of nodes to get the value from */ export declare function getArray(node: XmlNode, path?: any[]): any[];