@ztimson/utils 0.28.16 → 0.28.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/xml.d.ts ADDED
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Parses an XML string into a structured JavaScript object.
3
+ * @param {string} xml - The XML string to parse
4
+ * @returns {Object} An object with `tag`, `attributes`, and `children` properties
5
+ */
6
+ export declare function fromXml(xml: string): any;
7
+ /**
8
+ * Converts a JavaScript object into an XML string.
9
+ * @param {Object} obj - Object with `tag`, `attributes`, and `children` properties, or a string
10
+ * @param {string} indent - Current indentation level (used internally for formatting)
11
+ * @returns {string} The formatted XML string
12
+ */
13
+ export declare function toXml(obj: any, indent?: string): string;
14
+ /**
15
+ * Escapes or unescapes XML special characters.
16
+ * @param {string} str - The string to process
17
+ * @param {boolean} decode - If true, decodes XML entities; if false, encodes special characters
18
+ * @returns {string} The processed string
19
+ */
20
+ export declare function escapeXml(str: string, decode?: boolean): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ztimson/utils",
3
- "version": "0.28.16",
3
+ "version": "0.28.17",
4
4
  "description": "Utility library",
5
5
  "author": "Zak Timson",
6
6
  "license": "MIT",