good morning!!!!

Skip to content
Snippets Groups Projects
Commit 24c8fdc1 authored by Marek Kotewicz's avatar Marek Kotewicz
Browse files

do not print Plain Object prototype fields in geth console

parent 1f122626
No related branches found
No related tags found
No related merge requests found
......@@ -63,12 +63,24 @@ function pp(object, indent) {
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;
return result.filter(function (field) {
return redundantFields.indexOf(field) === -1;
});
};
var isBigNumber = function (object) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment