Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop
This commit is contained in:
commit
29a9c6bedd
@ -30,8 +30,8 @@ function pp(object, indent) {
|
|||||||
} else if(typeof(object) === "object") {
|
} else if(typeof(object) === "object") {
|
||||||
str += "{\n";
|
str += "{\n";
|
||||||
indent += " ";
|
indent += " ";
|
||||||
var last = Object.getOwnPropertyNames(object).pop()
|
var last = getFields(object).pop()
|
||||||
Object.getOwnPropertyNames(object).forEach(function (k) {
|
getFields(object).forEach(function (k) {
|
||||||
str += indent + k + ": ";
|
str += indent + k + ": ";
|
||||||
try {
|
try {
|
||||||
str += pp(object[k], indent);
|
str += pp(object[k], indent);
|
||||||
@ -63,11 +63,30 @@ function pp(object, indent) {
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var redundantFields = [
|
||||||
|
'valueOf',
|
||||||
|
'toString',
|
||||||
|
'toLocaleString',
|
||||||
|
'hasOwnProperty',
|
||||||
|
'isPrototypeOf',
|
||||||
|
'propertyIsEnumerable',
|
||||||
|
'constructor'
|
||||||
|
];
|
||||||
|
|
||||||
|
var getFields = function (object) {
|
||||||
|
var result = Object.getOwnPropertyNames(object);
|
||||||
|
if (object.constructor && object.constructor.prototype) {
|
||||||
|
result = result.concat(Object.getOwnPropertyNames(object.constructor.prototype));
|
||||||
|
}
|
||||||
|
return result.filter(function (field) {
|
||||||
|
return redundantFields.indexOf(field) === -1;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
var isBigNumber = function (object) {
|
var isBigNumber = function (object) {
|
||||||
return typeof BigNumber !== 'undefined' && object instanceof BigNumber;
|
return typeof BigNumber !== 'undefined' && object instanceof BigNumber;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
function prettyPrint(/* */) {
|
function prettyPrint(/* */) {
|
||||||
var args = arguments;
|
var args = arguments;
|
||||||
var ret = "";
|
var ret = "";
|
||||||
|
Loading…
Reference in New Issue
Block a user