mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 21:26:42 +00:00
output BigNumbers objects in console as strings
This commit is contained in:
parent
75c3f959d4
commit
45b4443f3f
1 changed files with 9 additions and 1 deletions
|
|
@ -97,7 +97,15 @@ var isMemberFunction = function(object, member) {
|
|||
}
|
||||
|
||||
var isBigNumber = function (object) {
|
||||
return typeof BigNumber !== 'undefined' && object instanceof BigNumber;
|
||||
var result = typeof BigNumber !== 'undefined' && object instanceof BigNumber;
|
||||
|
||||
if (!result) {
|
||||
if(typeof(object) === "object") {
|
||||
result = object.constructor.toString().indexOf("function BigNumber(") == 0;
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
};
|
||||
|
||||
function prettyPrint(/* */) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue