-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Conversation
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. |
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.
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 |
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.
nit: I think the may
was fine here.
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.
doh! was going to move the may
before the also
but missed it ...
@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} | |||
|
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.
Possibly don't have any efforts here, to further discourage it.
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.
Do you mean not to make edits here?
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.
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.
LGTM, and big +1 for grouping the deprecated functions at the bottom! |
LGTM. Very good @jasnell. |
PR-URL: #6897 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Landed in ef9778c |
PR-URL: #6897 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
PR-URL: #6897 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Checklist
Affected core subsystem(s)
doc (util)
Description of change
General improvements to util.md copy
@nodejs/documentation