Unverified Commit db495896 authored by Anna Henningsen's avatar Anna Henningsen Committed by Ruben Bridgewater
Browse files

console,util: avoid pair array generation in C++

Use a plain `[key, value, key, value]`-style list instead
of an array of pairs for inspecting collections.

This also fixes a bug with `console.table()` where
inspecting a non-key-value `MapIterator` would have
led to odd results.

PR-URL: https://github.com/nodejs/node/pull/20831
Refs: https://github.com/nodejs/node/pull/20719#discussion_r189342513


Reviewed-By: default avatarTiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: default avatarGus Caplan <me@gus.host>
Reviewed-By: default avatarMinwoo Jung <minwoo@nodesource.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarRuben Bridgewater <ruben@bridgewater.de>
parent df971261
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment