You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,7 @@ var myParser = new Parser(options);
29
29
*`returnError`: *function*; mandatory
30
30
*`returnFatalError`: *function*; optional, defaults to the returnError function
31
31
*`returnBuffers`: *boolean*; optional, defaults to false
32
+
*`stringNumbers`: *boolean*; optional, defaults to false
32
33
33
34
### Example
34
35
@@ -66,7 +67,7 @@ You do not have to use the returnFatalError function. Fatal errors will be retur
66
67
67
68
And if you want to return buffers instead of strings, you can do this by adding the `returnBuffers` option.
68
69
69
-
Big numbers that are too large for JS are automatically stringified.
70
+
If you handle with big numbers that are to large for JS (Number.MAX_SAFE_INTEGER === 2^53 - 16) please use the `stringNumbers` option. That way all numbers are going to be returned as String and you can handle them safely.
70
71
71
72
```js
72
73
// Same functions as in the first example
@@ -78,7 +79,8 @@ var parser = new Parser({
78
79
returnError:function(err) {
79
80
lib.returnError(err);
80
81
},
81
-
returnBuffers:true// All strings are returned as buffer e.g. <Buffer 48 65 6c 6c 6f>
82
+
returnBuffers:true, // All strings are returned as Buffer e.g. <Buffer 48 65 6c 6c 6f>
83
+
stringNumbers:true// All numbers are returned as String
0 commit comments