doc: note about custom inspect functions by thefourtheye · Pull Request #2142 · nodejs/node
See: #1798
When an Object is printed in REPL, the actual representation can be
overriden by defining inspect method on the objects. This patch
includes a note about the same in the REPL documentation
labels
Jul 9, 2015Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... defined an inspect function ...
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it now, thanks :-)
See: nodejs#1798 When an Object is printed in REPL, the actual representation can be overriden by defining `inspect` method on the objects. This patch includes a note about the same in the REPL documentation
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe remove depth?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, copy/paste mistake. Thanks :-)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe call this Customizing Object displays in the REPL
@cjihrig Thanks for the review. I changed the text now. PTAL.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Period after function
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just used :. Should this be a .?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think either a period or colon should be fine here. I originally said period because your sentence was coming to a finish, but you also have a following code block, so either should be fine.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, thanks :-)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing it out @targos :-) PTAL now.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be referred to as inspect()? I wish we had guidelines for that kind of thing... cc @nodejs/documentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters