Skip to content

util.format with array is different in Node.js 12 #29345

@rosen-vladimirov

Description

@rosen-vladimirov
  • Version: 12.9.1
  • Platform: Linux rvladimirov-ubuntu 5.0.0-25-generic #26~18.04.1-Ubuntu SMP Thu Aug 1 13:51:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux (same happens on macOS Mojave as well, probably on Windows)
  • Subsystem: util

The result of util.format had changed in Node.js 12:

util.format("result: %s", [ 1, 2])

Node.js 10.15.3 (and in fact all versions below 12): result: 1,2
Node.js 12.9.1 (in fact all 12.x.x versions): result: [ 1, 2 ]

Is this an intentional change?

Metadata

Metadata

Assignees

No one assigned

    Labels

    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