jsre: hide fields with prefix _ when pretty-printing

This makes web3 internals like _requestManager invisible.
pull/2235/head
Felix Lange 9 years ago
parent f08680985a
commit 05e257c22c
  1. 2
      jsre/pretty.go

@ -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

Loading…
Cancel
Save