-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
util: use [Array]
for deeply nested arrays
#12046
Conversation
@vsemozhetbyt Yes, thank you. :) |
Prefer `[Array]` over `[Object]` because the latter is confusing. Ref: nodejs#11651 PR-URL: nodejs#12046
2cdb13d
to
1ddf199
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I've been wanting this for a while :]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Do you know if there are any tests that still cover the else
logic?
@@ -72,6 +72,8 @@ assert.strictEqual(util.inspect({'a': {'b': { 'c': 2}}}, false, 0), | |||
'{ a: [Object] }'); | |||
assert.strictEqual(util.inspect({'a': {'b': { 'c': 2}}}, false, 1), | |||
'{ a: { b: [Object] } }'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cjihrig This should keep covering the else
branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI: https://ci.nodejs.org/job/node-test-commit/8722/ (oops, didn’t see Jeremiah’s CI run … ¯\_(ツ)_/¯) |
CI failures are unrelated. |
Prefer `[Array]` over `[Object]` because the latter is confusing. PR-URL: #12046 Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
Landed in 4a5a944 |
Prefer
[Array]
over[Object]
because the latter is confusing.I may be mistaken but I think this was brought up somewhere a few weeks ago (?) – I couldn’t find anything, but if somebody has aFixes:
tag I’ll happily ad it, and if this is a duplicate, I’ll happily close the PR. :)Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
util