jsre: hide fields with prefix _ when pretty-printing

This makes web3 internals like _requestManager invisible.
This commit is contained in:
Felix Lange 2016-02-20 15:47:25 +01:00
parent f08680985a
commit 05e257c22c
1 changed files with 1 additions and 1 deletions

View File

@ -177,7 +177,7 @@ func (ctx ppctx) fields(obj *otto.Object) []string {
seen = make(map[string]bool)
)
add := func(k string) {
if seen[k] || boringKeys[k] {
if seen[k] || boringKeys[k] || strings.HasPrefix(k, "_") {
return
}
seen[k] = true