@rea-jet/fast-xml-parser
Advanced tools
Comparing version 4.0.0 to 4.0.1-beta0
{ | ||
"name": "@rea-jet/fast-xml-parser", | ||
"version": "4.0.0", | ||
"version": "4.0.1-beta0", | ||
"description": "Validate XML or Parse XML to JS/JSON very fast without C/C++ based libraries", | ||
@@ -69,7 +69,7 @@ "main": "./src/parser.js", | ||
"devDependencies": { | ||
"@babel/core": "7.1.6", | ||
"@babel/core": "7.5.5", | ||
"@babel/plugin-transform-runtime": "~7.0.0-rc.2", | ||
"@babel/preset-env": "7.2.3", | ||
"@babel/register": "~7.0.0-rc.2", | ||
"babel-loader": "~8.0.0-beta.6", | ||
"babel-loader": "8.0.4", | ||
"benchmark": "^2.1.4", | ||
@@ -89,5 +89,5 @@ "eslint": "5.6.0", | ||
"nimnjs": "^1.3.2", | ||
"ramda": "0.25.0" | ||
"ramda": "0.26.1" | ||
}, | ||
"typings": "src/parser.d.ts" | ||
} | ||
} |
@@ -38,3 +38,3 @@ 'use strict'; | ||
}, | ||
sortkey: undefined | ||
sortkey: undefined, | ||
//decodeStrict: false, | ||
@@ -62,3 +62,3 @@ }; | ||
'parseTrueNumberOnly', | ||
'sortkey' | ||
'sortkey', | ||
]; | ||
@@ -135,2 +135,7 @@ exports.props = props; | ||
currentNode.addChild(childNode); | ||
if (options.sortkey) { | ||
childNode.attrsMap[options.sortkey] = indices[indices.length - 1]; | ||
indices[indices.length - 1]++; | ||
} | ||
} else { | ||
@@ -163,3 +168,6 @@ //TagType.OPENING | ||
if (val) { | ||
if (options.trimValues) { | ||
// trim value if option forces it or when a newline is present in the node | ||
// if option is false the second condition prevents a lot value nodes for nodes | ||
// which contains other nodes in new lines | ||
if (options.trimValues || val.indexOf('\n') > -1) { | ||
val = val.trim(); | ||
@@ -220,3 +228,5 @@ } | ||
if (parseTrueNumberOnly) { | ||
parsed = String(parsed) === val ? parsed : val; | ||
// parsed = String(parsed) === val ? parsed : val; | ||
parsed = | ||
val.length >= 2 && val[0] === '0' && val[1] != '.' ? val : parsed; | ||
} | ||
@@ -223,0 +233,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80189
44
1532
2
1
+ Addedramda@0.26.1(transitive)
- Removedramda@0.25.0(transitive)
Updatedramda@0.26.1