fast-xml-parser 3.17.5 → 3.17.6
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/package.json +5 -6
- package/src/node2json.js +3 -2
- package/tasks/postinstall.js +0 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fast-xml-parser",
|
|
3
|
-
"version": "3.17.
|
|
3
|
+
"version": "3.17.6",
|
|
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": {
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"bundle": "webpack && webpack --config webpack-prod.config.js",
|
|
12
12
|
"coverage": "istanbul cover -x \"cli.js\" -x \"spec/*spec.js\" jasmine spec/*spec.js;",
|
|
13
13
|
"coverage:check": "istanbul check-coverage --branch 90 --statement 90",
|
|
14
|
-
"postinstall": "node tasks/postinstall.js || exit 0",
|
|
15
14
|
"prettier": "prettier --write src/**/*.js",
|
|
16
15
|
"publish-please": "publish-please",
|
|
17
16
|
"prepublishOnly": "publish-please guard"
|
|
@@ -70,10 +69,10 @@
|
|
|
70
69
|
],
|
|
71
70
|
"license": "MIT Modified",
|
|
72
71
|
"devDependencies": {
|
|
73
|
-
"@babel/core": "^7.12.
|
|
74
|
-
"@babel/plugin-transform-runtime": "^7.12.
|
|
75
|
-
"@babel/preset-env": "^7.12.
|
|
76
|
-
"@babel/register": "^7.12.
|
|
72
|
+
"@babel/core": "^7.12.10",
|
|
73
|
+
"@babel/plugin-transform-runtime": "^7.12.10",
|
|
74
|
+
"@babel/preset-env": "^7.12.11",
|
|
75
|
+
"@babel/register": "^7.12.10",
|
|
77
76
|
"babel-loader": "^8.2.2",
|
|
78
77
|
"eslint": "^5.16.0",
|
|
79
78
|
"he": "^1.2.0",
|
package/src/node2json.js
CHANGED
|
@@ -29,8 +29,9 @@ const convertToJson = function(node, options) {
|
|
|
29
29
|
if (node.child[tagname] && node.child[tagname].length > 1) {
|
|
30
30
|
jObj[tagname] = [];
|
|
31
31
|
for (var tag in node.child[tagname]) {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
if (node.child[tagname].hasOwnProperty(tag)){
|
|
33
|
+
jObj[tagname].push(convertToJson(node.child[tagname][tag], options));}
|
|
34
|
+
}
|
|
34
35
|
} else {
|
|
35
36
|
if(options.arrayMode === true){
|
|
36
37
|
const result = convertToJson(node.child[tagname][0], options)
|