true-json-bigint
Advanced tools
Comparing version 0.4.5 to 0.4.6
{ | ||
"name": "true-json-bigint", | ||
"version": "0.4.5", | ||
"version": "0.4.6", | ||
"description": "Enhanced fork of json-bigint that allows parsing all big number values in JSON strings.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -18,5 +18,7 @@ true-json-bigint | ||
### Examples | ||
Parse JSON strings as described in the next example: | ||
``` | ||
```js | ||
const JSONbig = require('true-json-bigint'); | ||
@@ -28,4 +30,4 @@ | ||
console.log(result); // { smallNumber: 1, | ||
// bigNumber: BigNumber { s: 1, e: 26, c: [ 9876543211234, 56789987654321 ] } } | ||
console.log(result); | ||
// { smallNumber: 1, bigNumber: BigNumber { s: 1, e: 26, c: [ 9876543211234, 56789987654321 ] } } | ||
``` | ||
@@ -35,3 +37,3 @@ | ||
``` | ||
```js | ||
const JSONbig = require('true-json-bigint'); | ||
@@ -46,3 +48,4 @@ const BigNumber = require('bignumber.js'); | ||
console.log(result); // {"smallNumber":1,"bigNumber":9.87654321123456789987654321e+26} | ||
console.log(result); | ||
// {"smallNumber":1,"bigNumber":9.87654321123456789987654321e+26} | ||
@@ -49,0 +52,0 @@ ``` |
34920
11
739
51