Skip to content

doc: correct util.inspect null-prototype example - #65187

Closed
arhxam wants to merge 1 commit into
nodejs:mainfrom
arhxam:doc-util-inspect-null-prototype
Closed

doc: correct util.inspect null-prototype example#65187
arhxam wants to merge 1 commit into
nodejs:mainfrom
arhxam:doc-util-inspect-null-prototype

Conversation

@arhxam

@arhxam arhxam commented Aug 10, 2026

Copy link
Copy Markdown

Description

The util.inspect() example for an object created with Object.create(null)
shows the output as '[foo] {}'. Current util.inspect() identifies the null
prototype before the Symbol.toStringTag value and returns:

[Object: null prototype] [foo] {}

This updates the example so readers can compare it with the actual output.
Documentation-only change.

The example omitted the null-prototype prefix that util.inspect() emits
before Symbol.toStringTag. Update the expected output so it matches the
current source-built runtime.

Signed-off-by: Arham Wani <arhamwani765@gmail.com>
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. util Issues and PRs related to the built-in util module. labels Aug 10, 2026
@aduh95 aduh95 closed this Aug 10, 2026
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.

3 participants