@dfinity/candid
Advanced tools
Comparing version 0.9.2 to 0.9.3
@@ -145,3 +145,3 @@ "use strict"; | ||
valueToString(x) { | ||
return JSON.stringify(x); | ||
return toReadableString(x); | ||
} | ||
@@ -1126,8 +1126,3 @@ /* Implement `T` in the IDL spec, only needed for non-primitive types */ | ||
function toReadableString(x) { | ||
if (typeof x === 'bigint') { | ||
return `BigInt(${x})`; | ||
} | ||
else { | ||
return JSON.stringify(x); | ||
} | ||
return JSON.stringify(x, (_key, value) => typeof value === 'bigint' ? `BigInt(${value})` : value); | ||
} | ||
@@ -1134,0 +1129,0 @@ /** |
@@ -137,3 +137,3 @@ // tslint:disable:max-classes-per-file | ||
valueToString(x) { | ||
return JSON.stringify(x); | ||
return toReadableString(x); | ||
} | ||
@@ -1096,8 +1096,3 @@ /* Implement `T` in the IDL spec, only needed for non-primitive types */ | ||
function toReadableString(x) { | ||
if (typeof x === 'bigint') { | ||
return `BigInt(${x})`; | ||
} | ||
else { | ||
return JSON.stringify(x); | ||
} | ||
return JSON.stringify(x, (_key, value) => typeof value === 'bigint' ? `BigInt(${value})` : value); | ||
} | ||
@@ -1104,0 +1099,0 @@ /** |
{ | ||
"name": "@dfinity/candid", | ||
"version": "0.9.2", | ||
"version": "0.9.3", | ||
"author": "DFINITY Stiftung <sdk@dfinity.org>", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
474294
5799
2