fast-xml-parser 3.17.4 → 3.17.5

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/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- MIT License
1
+ Modified MIT License
2
2
 
3
3
  Copyright (c) 2017 Amit Kumar Gupta
4
4
 
@@ -9,7 +9,15 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
9
  copies of the Software, and to permit persons to whom the Software is
10
10
  furnished to do so, subject to the following conditions:
11
11
 
12
- If you use this library in a public repository then you give us the right to mention your company name and logo in user's list without further permission required, but you can request them to be taken down within 30 days.
12
+ If you use this library then you give us the rights to mention your
13
+ company/project name and logo in user's list without further permission required.
14
+ However, you can request to remove it when you're not the user of this library anymore.
15
+ We'll do the necessary changes within 30 days from the notice.
16
+
17
+ You're not allowed to publish the code of this library without giving credits to
18
+ the original author/maintainers or without permission. You're required to take
19
+ the permission from original author to remove any non-code changes which are purposefully
20
+ added to this project including pre/post install message, notification on README, etc.
13
21
 
14
22
  The above copyright notice and this permission notice shall be included in all
15
23
  copies or substantial portions of the Software.
package/README.md CHANGED
@@ -14,6 +14,8 @@
14
14
 
15
15
  Validate XML, Parse XML to JS/JSON and vice versa, or parse XML to Nimn rapidly without C/C++ based libraries and no callback
16
16
 
17
+ To cover expenses, we're planning to launch [FXP Enterprise](https://github.com/NaturalIntelligence/fxp-ent) edition in parallel. Watch it for further updates, if you're interested.
18
+
17
19
  ![Donate $5](static/img/donation_quote.png)
18
20
 
19
21
  <a href="https://opencollective.com/fast-xml-parser/donate" target="_blank">
@@ -301,9 +303,6 @@ With the correct options, you can get the almost original XML without losing any
301
303
 
302
304
  </details>
303
305
 
304
- ### Limitations
305
- Currently FXP fails to parse XML with attributes has ">" in the value. This problem is left open as change in regex for its fix is degrading the performance. And the parser become very slow in case of long attribute names. However, it is not ignored and we're working on the fix.
306
-
307
306
  ### Worth to mention
308
307
 
309
308
  - **[BigBit standard)](https://github.com/amitguptagwl/bigbit)** : A standard to represent any number in the universe in comparatively less space and without precision loss. A standard to save memory to represent any text string in comparision of UTF encodings.
@@ -317,7 +316,7 @@ With the correct options, you can get the almost original XML without losing any
317
316
 
318
317
  ## Contributors
319
318
 
320
- This project exists thanks to [all](graphs/contributors) the people who contribute. [[Contribute](CONTRIBUTING.md)].
319
+ This project exists thanks to [all](graphs/contributors) the people who contribute. [[Contribute](docs/CONTRIBUTING.md)].
321
320
  <!-- <a href="graphs/contributors"><img src="https://opencollective.com/fast-xml-parser/contributors.svg?width=890&button=false" /></a> -->
322
321
  <!--
323
322
  ### Lead Maintainers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fast-xml-parser",
3
- "version": "3.17.4",
3
+ "version": "3.17.5",
4
4
  "description": "Validate XML or Parse XML to JS/JSON very fast without C/C++ based libraries",
5
5
  "main": "./src/parser.js",
6
6
  "scripts": {
@@ -68,23 +68,23 @@
68
68
  "url": "https://github.com/Tatsh"
69
69
  }
70
70
  ],
71
- "license": "MIT",
71
+ "license": "MIT Modified",
72
72
  "devDependencies": {
73
- "@babel/core": "^7.10.2",
74
- "@babel/plugin-transform-runtime": "^7.10.1",
75
- "@babel/preset-env": "^7.10.2",
76
- "@babel/register": "^7.10.1",
77
- "babel-loader": "^8.1.0",
73
+ "@babel/core": "^7.12.9",
74
+ "@babel/plugin-transform-runtime": "^7.12.1",
75
+ "@babel/preset-env": "^7.12.7",
76
+ "@babel/register": "^7.12.1",
77
+ "babel-loader": "^8.2.2",
78
78
  "eslint": "^5.16.0",
79
79
  "he": "^1.2.0",
80
80
  "http-server": "^0.12.3",
81
81
  "istanbul": "^0.4.5",
82
- "jasmine": "^3.5.0",
82
+ "jasmine": "^3.6.3",
83
83
  "nimnjs": "^1.3.2",
84
84
  "prettier": "^1.19.1",
85
- "publish-please": "^5.5.1",
86
- "webpack": "^4.43.0",
87
- "webpack-cli": "^3.3.11"
85
+ "publish-please": "^5.5.2",
86
+ "webpack": "^4.44.2",
87
+ "webpack-cli": "^3.3.12"
88
88
  },
89
89
  "typings": "src/parser.d.ts",
90
90
  "funding": {
@@ -168,7 +168,7 @@ function buildAttributesMap(attrStr, options) {
168
168
  }
169
169
 
170
170
  const getTraversalObj = function(xmlData, options) {
171
- xmlData = xmlData.replace(/(\r\n)|\n/, " ");
171
+ xmlData = xmlData.replace(/\r\n?/g, "\n");
172
172
  options = buildOptions(options, defaultOptions, props);
173
173
  const xmlObj = new xmlNode('!xml');
174
174
  let currentNode = xmlObj;
@@ -254,7 +254,7 @@ const getTraversalObj = function(xmlData, options) {
254
254
  const separatorIndex = tagExp.indexOf(" ");
255
255
  let tagName = tagExp;
256
256
  if(separatorIndex !== -1){
257
- tagName = tagExp.substr(0, separatorIndex).trimRight();
257
+ tagName = tagExp.substr(0, separatorIndex).replace(/\s\s*$/, '');
258
258
  tagExp = tagExp.substr(separatorIndex + 1);
259
259
  }
260
260