-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
doc: note about custom inspect functions #2142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: note about custom inspect functions #2142
Conversation
doc/api/repl.markdown
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... defined an inspect function ...
There was a problem hiding this comment.
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
eec353d to
b08202a
Compare
|
bump |
doc/api/repl.markdown
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe remove depth?
There was a problem hiding this comment.
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 :-)
|
LGTM Otherwise. |
|
@Fishrock123 Addressed the comments. PTAL :-) |
|
Bump! |
doc/api/repl.markdown
Outdated
There was a problem hiding this comment.
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. |
doc/api/repl.markdown
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Period after function
There was a problem hiding this comment.
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 .?
|
LGTM minus a few comments. |
doc/api/repl.markdown
Outdated
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, thanks :-)
|
@Fishrock123 Can you PTAL and give LGTM, so that I can land this? EDIT: CC @targos |
doc/api/repl.markdown
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link should be relative. You can see how it's done in https://raw.githubusercontent.com/nodejs/io.js/master/doc/api/console.markdown
|
Thanks for pointing it out @targos :-) PTAL now. |
|
LGTM |
doc/api/repl.markdown
Outdated
There was a problem hiding this comment.
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
doc/api/repl.markdown
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend using However instead of But here. It's slightly more formal english.
|
Nits but LGTM |
|
@Fishrock123 I incorporated the comments now. This already got 3 LGTMs. If no other suggestions, I ll merge this by 9:00 PM IST 24th Jul 2015 |
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. PR-URL: #2142 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
|
Thanks people, landed at d9f857d :-) |
See: #1798
When an Object is printed in REPL, the actual representation can be
overriden by defining
inspectmethod on the objects. This patchincludes a note about the same in the REPL documentation