Skip to content

doc: note about custom inspect functions - #2142

Closed
thefourtheye wants to merge 6 commits into
nodejs:masterfrom
thefourtheye:repl-doc-improvement-inspect
Closed

doc: note about custom inspect functions#2142
thefourtheye wants to merge 6 commits into
nodejs:masterfrom
thefourtheye:repl-doc-improvement-inspect

Conversation

@thefourtheye

Copy link
Copy Markdown
Contributor

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

@mscdexmscdex added doc Issues and PRs related to the documentations. repl Issues and PRs related to the REPL subsystem. labels Jul 9, 2015
Comment threaddoc/api/repl.markdown Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... defined aninspect function ...

Copy link
Copy Markdown
ContributorAuthor

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
@thefourtheye
thefourtheyeforce-pushed the repl-doc-improvement-inspect branch from eec353d to b08202aCompareJuly 10, 2015 21:23
@thefourtheye

Copy link
Copy Markdown
ContributorAuthor

bump

Comment threaddoc/api/repl.markdown Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe remove depth?

Copy link
Copy Markdown
ContributorAuthor

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 :-)

@Fishrock123

Copy link
Copy Markdown
Contributor

LGTM Otherwise.

@thefourtheye

Copy link
Copy Markdown
ContributorAuthor

@Fishrock123 Addressed the comments. PTAL :-)

@thefourtheye

Copy link
Copy Markdown
ContributorAuthor

Bump!

Comment threaddoc/api/repl.markdown Outdated

Copy link
Copy Markdown
Contributor

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

@thefourtheye

Copy link
Copy Markdown
ContributorAuthor

@cjihrig Thanks for the review. I changed the text now. PTAL.

Comment threaddoc/api/repl.markdown Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Period after function

Copy link
Copy Markdown
ContributorAuthor

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 .?

@cjihrig

Copy link
Copy Markdown
Contributor

LGTM minus a few comments.

Comment threaddoc/api/repl.markdown Outdated

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks :-)

@thefourtheye

Copy link
Copy Markdown
ContributorAuthor

@Fishrock123 Can you PTAL and give LGTM, so that I can land this?

EDIT: CC @targos

Comment threaddoc/api/repl.markdown Outdated

Copy link
Copy Markdown
Member

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

@thefourtheye

Copy link
Copy Markdown
ContributorAuthor

Thanks for pointing it out @targos :-) PTAL now.

@targos

Copy link
Copy Markdown
Member

LGTM

Comment threaddoc/api/repl.markdown Outdated

Copy link
Copy Markdown
Contributor

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

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docIssues and PRs related to the documentations.replIssues and PRs related to the REPL subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@thefourtheye@Fishrock123@cjihrig@targos@mscdex