Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

util: .inspect() misformats __proto__ property on prototype-less object #3788

Copy link
Copy link
@bnoordhuis

Description

@bnoordhuis
Issue body actions
> var o = Object.create(null); o.__proton__ = 42; util.inspect(o)
'{ __proton__: 42 }'  // no brackets

> var o = Object.create(null); o.__proto__ = 42; util.inspect(o)
'{ [__proto__]: 42 }'  // brackets

I speculate arrayToHash() needs to use Object.create(null) for its dictionary object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.utilIssues and PRs related to the built-in util module.Issues and PRs related to the built-in util module.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.