Update console.table docs.#20318
Update console.table docs.#20318sant123 wants to merge 2 commits intonodejs:masterfrom sant123:sant123-fix-console-docs
Conversation
PR-URL: #18137 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
|
/ping @BridgeAR |
|
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: |
|
Leave a π here if you are a Collaborator in favor of fast-tracking this. |
|
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)
@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 |
|
@Trott If I push my own commit, will not this mess up with |
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
|
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
|
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? |
|
Checklist