fast-xml-parser 4.0.9 → 4.0.10

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  Note: If you find missing information about particular minor version, that version must have been changed without any functional change in this library.
2
2
 
3
+ **4.0.10 / 2022-09-14**
4
+ * fix broken links in demo site (By [Yannick Lang](https://github.com/layaxx))
5
+ * fix #491: tagValueProcessor type definition (By [Andrea Francesco Speziale](https://github.com/andreafspeziale))
6
+ * Add jsdocs for tagValueProcessor
7
+
8
+
3
9
  **4.0.9 / 2022-07-10**
4
10
  * fix #470: stop-tag can have self-closing tag with same name
5
11
  * fix #472: stopNode can have any special tag inside
package/README.md CHANGED
@@ -34,7 +34,6 @@ Check [ThankYouBackers](https://github.com/NaturalIntelligence/ThankYouBackers)
34
34
  <a href="https://github.com/prettier" title="Prettier" > <img src="https://avatars0.githubusercontent.com/u/25822731" width="60px" ></a>
35
35
  <a href="http://brain.js.org/" title="brain.js" > <img src="https://avatars2.githubusercontent.com/u/23732838" width="60px" ></a>
36
36
  <a href="https://github.com/aws" title="AWS SDK" > <img src="https://avatars.githubusercontent.com/u/2232217" width="60px" ></a>
37
- <a href="#" title="NHS Connect" > <img src="https://avatars3.githubusercontent.com/u/20316669" width="60px" ></a>
38
37
  <a href="http://www.fda.gov/" title="Food and Drug Administration " > <img src="https://avatars2.githubusercontent.com/u/6471964" width="60px" ></a>
39
38
  <a href="http://www.magento.com/" title="Magento" > <img src="https://avatars2.githubusercontent.com/u/168457" width="60px" ></a>
40
39
 
@@ -50,7 +49,7 @@ Check the list of all known users [here](./USERs.md);
50
49
  * Parse XML to JS Object
51
50
  * Build XML from JS Object
52
51
  * Works with node packages, in browser, and in CLI (press try me button above for demo)
53
- * Faster than any pure JS implementation.
52
+ * Faster than any other pure JS implementation.
54
53
  * It can handle big files (tested up to 100mb).
55
54
  * Controlled parsing using various options
56
55
  * XML Entities, HTML entities, and DOCTYPE entites are supported.
@@ -121,7 +120,7 @@ Check lib folder for different browser bundles
121
120
  2. [XML Parser](./docs/v4/2.XMLparseOptions.md)
122
121
  3. [XML Builder](./docs/v4/3.XMLBuilder.md)
123
122
  4. [XML Validator](./docs/v4/4.XMLValidator.md)
124
- 5. [Entites](./docs/v4/5.Entities.md)
123
+ 5. [Entities](./docs/v4/5.Entities.md)
125
124
  6. [HTML Document Parsing](./docs/v4/6.HTMLParsing.md)
126
125
  7. [PI Tag processing](./docs/v4/7.PITags.md)
127
126
  ## Performance
@@ -191,4 +190,4 @@ Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com
191
190
  # License
192
191
  * MIT License
193
192
 
194
- ![Donate $5](static/img/donation_quote.png)
193
+ ![Donate $5](static/img/donation_quote.png)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fast-xml-parser",
3
- "version": "4.0.9",
3
+ "version": "4.0.10",
4
4
  "description": "Validate XML, Parse XML, Build XML without C/C++ based libraries",
5
5
  "main": "./src/fxp.js",
6
6
  "scripts": {
@@ -53,7 +53,7 @@
53
53
  "jasmine": "^3.6.4",
54
54
  "nyc": "^15.1.0",
55
55
  "prettier": "^1.19.1",
56
- "publish-please": "^5.5.2",
56
+ "publish-please": "^2.4.1",
57
57
  "webpack": "^5.64.4",
58
58
  "webpack-cli": "^4.9.1"
59
59
  },
package/src/fxp.d.ts CHANGED
@@ -11,7 +11,15 @@ type X2jOptions = {
11
11
  trimValues: boolean;
12
12
  cdataPropName: false | string;
13
13
  commentPropName: false | string;
14
- tagValueProcessor: (tagName: string, tagValue: string, jPath: string, hasAttributes: boolean, isLeafNode: boolean) => string;
14
+ /**
15
+ Control how tag value should be parsed. Called only if tag value is not empty
16
+
17
+ @returns {undefined|null} `undefined` or `null` to set original value.
18
+ @returns {unknown}
19
+ 1. Different value or value with different data type to set new value. <br>
20
+ 2. Same value to set parsed value if `parseTagValue: true`.
21
+ */
22
+ tagValueProcessor: (tagName: string, tagValue: string, jPath: string, hasAttributes: boolean, isLeafNode: boolean) => unknown;
15
23
  attributeValueProcessor: (attrName: string, attrValue: string, jPath: string) => string;
16
24
  numberParseOptions: strnumOptions;
17
25
  stopNodes: string[];