You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
util.inspect calls custom inspect methods on objects. This is great. It doesn't pass its options argument to the custom method, which is not great.
As a result, e.g., the options showHidden and colors aren't applied recursively to objects with custom inspect methods.
Current behavior:
>varparent={child: {'visible': "I am visible."}};>Object.defineProperty(parent.child,'hidden',{value: "I am hidden."});>parent.inspect=function(options){return"Here's my child: "+util.inspect(this.child,options);};>util.inspect(parent,{showHidden: true});'Here\'s my child: { visible: \'I am visible.\' }'
Desired behavior:
>util.inspect(parent,{showHidden: true});'Here\'s my child: { visible: \'I am visible.\', [hidden]: \'I am hidden.\' }'
The text was updated successfully, but these errors were encountered:
util.inspect
calls custom inspect methods on objects. This is great. It doesn't pass itsoptions
argument to the custom method, which is not great.As a result, e.g., the options
showHidden
andcolors
aren't applied recursively to objects with custom inspect methods.Current behavior:
Desired behavior:
The text was updated successfully, but these errors were encountered: