Skip to content
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: general improvements to util.md #6897

Closed
wants to merge 3 commits into from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented May 20, 2016

Checklist
  • documentation is changed or added
  • the commit message follows commit guidelines
Affected core subsystem(s)

doc (util)

Description of change

General improvements to util.md copy

@nodejs/documentation

@jasnell jasnell added util Issues and PRs related to the built-in util module. doc Issues and PRs related to the documentations. labels May 20, 2016
show all array elements. Set to `0` or negative to show no array elements.

Example of inspecting all properties of the `util` object:
* `object` {any} Any JavsScript primitive or Object.
Copy link
Member

Choose a reason for hiding this comment

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

typo: JavaScript


### Custom `inspect()` function on Objects

<!-- type=misc -->

Objects also may define their own `inspect(depth)` function which `util.inspect()`
will invoke and use the result of when inspecting the object:
Objects also define their own `inspect(depth, opts)` function that
Copy link
Member

Choose a reason for hiding this comment

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

nit: I think the may was fine here.

Copy link
Member Author

Choose a reason for hiding this comment

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

doh! was going to move the may before the also but missed it ...

@jasnell
Copy link
Member Author

jasnell commented May 20, 2016

@addaleax ... fixed!

@@ -130,6 +128,9 @@ _Note: usage of util.inherits() is discouraged. Please use the ES6 `class` and
`extends` keywords to get language level inheritance support. Also note that
the two styles are [semantically incompatible][]._

* `constructor` {Function}
* `superConstructor` {Function}

Copy link
Contributor

Choose a reason for hiding this comment

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

Possibly don't have any efforts here, to further discourage it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you mean not to make edits here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, but I continued reading and you added those for the deprecated APIs as well. It would be more consistent then to have this <- change of mind. Thx.

@addaleax
Copy link
Member

LGTM, and big +1 for grouping the deprecated functions at the bottom!

@eljefedelrodeodeljefe
Copy link
Contributor

LGTM. Very good @jasnell.

jasnell added a commit that referenced this pull request May 23, 2016
PR-URL: #6897
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
@jasnell
Copy link
Member Author

jasnell commented May 23, 2016

Landed in ef9778c

@jasnell jasnell closed this May 23, 2016
Fishrock123 pushed a commit that referenced this pull request May 23, 2016
PR-URL: #6897
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
rvagg pushed a commit that referenced this pull request Jun 2, 2016
PR-URL: #6897
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. util Issues and PRs related to the built-in util module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants