Skip to content

util: escaping object keys in util.inspect() #16979

Closed
@vsemozhetbyt

Description

@vsemozhetbyt
  • Version: v4–v10
  • Platform: Windows 7 x64
  • Subsystem: util
'use strict';

console.log({ '\\n': '\\n' });
{ '\n': '\\n' }

Is it OK that we escape values here, but do not escape keys?

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueIssues that are suitable for first-time contributors.utilIssues 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