提交 05e257c2 编写于 作者: F Felix Lange

jsre: hide fields with prefix _ when pretty-printing

This makes web3 internals like _requestManager invisible.
上级 f0868098
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册