Comparing version 0.5.34 to 0.5.35
@@ -22,8 +22,7 @@ /** | ||
var ret = JSON.parse(value); | ||
// Numbers larger than MAX_SAFE_INTEGER will contain rounding errors so, | ||
// we will just leave them as strings instead. The length > 15 check is because | ||
// the MAX_SAFE_INTEGER in javascript is 9007199254740991 which has a length of 16. | ||
// Using a length > 15 check is still safe and faster than trying to use another | ||
// library that supports big integers. | ||
if (typeof ret === 'number' && value.length > 15) { | ||
// Big interger, big decimal and the number in exponential notations will results | ||
// in unexpected form. e.g. 1234e1234 will be parsed into Infinity and the | ||
// number > MAX_SAFE_INTEGER will cause a rounding error. | ||
// So we will just leave them as strings instead. | ||
if (typeof ret === 'number' && String(value) !== String(ret)) { | ||
ret = value; | ||
@@ -30,0 +29,0 @@ } |
{ | ||
"name": "fetchr", | ||
"version": "0.5.34", | ||
"version": "0.5.35", | ||
"description": "Fetchr augments Flux applications by allowing Flux stores to be used on server and client to fetch data", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
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
72687
1378