Skip to content

Commit 05e257c

Browse files
committed
jsre: hide fields with prefix _ when pretty-printing
This makes web3 internals like _requestManager invisible.
1 parent f086809 commit 05e257c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎jsre/pretty.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func (ctx ppctx) fields(obj *otto.Object) []string {
177177
seen = make(map[string]bool)
178178
)
179179
add := func(k string) {
180-
if seen[k] || boringKeys[k] {
180+
if seen[k] || boringKeys[k] || strings.HasPrefix(k, "_") {
181181
return
182182
}
183183
seen[k] = true

0 commit comments

Comments
 (0)