good morning!!!!

Skip to content
Snippets Groups Projects
Commit 05e257c2 authored by Felix Lange's avatar Felix Lange
Browse files

jsre: hide fields with prefix _ when pretty-printing

This makes web3 internals like _requestManager invisible.
parent f0868098
No related branches found
No related tags found
No related merge requests found
...@@ -177,7 +177,7 @@ func (ctx ppctx) fields(obj *otto.Object) []string { ...@@ -177,7 +177,7 @@ func (ctx ppctx) fields(obj *otto.Object) []string {
seen = make(map[string]bool) seen = make(map[string]bool)
) )
add := func(k string) { add := func(k string) {
if seen[k] || boringKeys[k] { if seen[k] || boringKeys[k] || strings.HasPrefix(k, "_") {
return return
} }
seen[k] = true seen[k] = true
......
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