Re:Use console.log() like a pro (2020)
by I_am_tiberius on Monday April 12, 2021 @12:48PM
(#26781699)
Very important for backend is %j (e.g.: console.log('%j', variable); which can output complex json objects to the terminal. I often write it to the terminal and then copy it to an online json viewer so it is formatted in a viewable format.
[ Parent
| on HN ]
Have you tried `jq`? https://stedolan.github.io/jq/
Maybe you can skip a step with pasting online.
do you know about util.inspect? https://nodejs.org/api/util.html#util_util_inspect_object_sh...
Re:Use console.log() like a pro (2020)
by I_am_tiberius on Monday April 12, 2021 @04:18PM
(#26784625)
I did not. Thanks!