Skip to content

Commit

Permalink
make eNotation optional
Browse files Browse the repository at this point in the history
  • Loading branch information
amitguptagwl committed Jan 25, 2023
1 parent 40a2176 commit 6ebcb14
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/v4/2.XMLparseOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,8 @@ const options = {
numberParseOptions: {
leadingZeros: true,
hex: true,
skipLike: /\+[0-9]{10}/
skipLike: /\+[0-9]{10}/,
// eNotation: false
}
};
const parser = new XMLParser(options);
Expand Down
2 changes: 1 addition & 1 deletion src/fxp.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type strnumOptions = {
hex: boolean;
leadingZeros: boolean,
skipLike?: RegExp,
eNotation: boolean
eNotation?: boolean
}
type X2jOptionsOptional = Partial<X2jOptions>;
type validationOptions = {
Expand Down
3 changes: 2 additions & 1 deletion src/xmlparser/OptionsBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const defaultOptions = {
cdataPropName: false,
numberParseOptions: {
hex: true,
leadingZeros: true
leadingZeros: true,
eNotation: false
},
tagValueProcessor: function(tagName, val) {
return val;
Expand Down

0 comments on commit 6ebcb14

Please sign in to comment.