Uh oh!
There was an error while loading. Please reload this page.
Update console.table docs. - #20318
Conversation
PR-URL: #18137 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Trott
commented
Apr 26, 2018
/ping @BridgeAR |
Trott
commented
Apr 26, 2018
Trott
commented
Apr 26, 2018
Commit message doesn't conform to the guidelines/conventions used, but especially for such a focused change, whoever is landing the code can certainly fix it. In case that person is not me and whoever it is doesn't want to think about it, here's a suggested commit log: |
Trott
commented
Apr 26, 2018
Leave a 👍 here if you are a Collaborator in favor of fast-tracking this. |
vsemozhetbyt
commented
Apr 26, 2018
Should an example of a call without |
Also not sure if this is a typo: |
vsemozhetbyt
left a comment
There was a problem hiding this comment.
LGTM with ignorable nits in comments)
Trott
commented
Apr 26, 2018
@vsemozhetbyt Yes (although it doesn't have to be in this pull request if @sant123 just wants to get a quick correction in and not spend time perfecting the |
vsemozhetbyt
commented
Apr 26, 2018
@Trott If I push my own commit, will not this mess up with |
Trott
commented
Apr 26, 2018
If I had to guess, I wouldn't think so, but if you believe it might, you very well could be right! |
| ```js | ||
| console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }]); | ||
| console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a', 'b']); |
There was a problem hiding this comment.
The parameter properties is optional here.
The output is same even if ['a', 'b'] is not passed as properties
There was a problem hiding this comment.
For me:
>console.table([{a: 1,b: 'Y'},{a: 'Z',b: 2}]);┌─────────┬──────────────────┐│(index)│Values│├─────────┼──────────────────┤│0│{a: 1,b: 'Y'}││1│{ a: 'Z',b: 2}│└─────────┴──────────────────┘There was a problem hiding this comment.
They are optional, but not with the same output it seems.
There was a problem hiding this comment.
@vsemozhetbyt You're right. I just verified it with Node.js v10.0.0
My bad, earlier I'd verified it on Google Chrome v66 where the output was same even if ['a', 'b'] is not passed as properties
vsemozhetbyt
commented
Apr 26, 2018
I've pushed under the OP username and email, this can be reverted if I am wrong. CI-lite: https://ci.nodejs.org/job/node-test-pull-request-lite/601/ |
devsnek
left a comment
There was a problem hiding this comment.
we should fix the bug not document the bugged behaviour
Trott
commented
Apr 26, 2018
Tiriel
commented
Apr 26, 2018
As noted in #17128 (comment) the method still appears in the inspector-only methods (line 508 on the new diff). Maybe we should take the opportunity to fix this? |
Trott
commented
Apr 26, 2018
|
Checklist